/* Custom Styles for IOA Website */

:root {
    --primary-color: #268288;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --bs-primary: #268288;
    --bs-primary-rgb: 38, 130, 136;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 0;
}

/* Navigation */
.navbar {
    min-height: 200px;
    padding: 10px 0;
    align-items: flex-start;
    position: relative;
}

/* Dropdown on Hover */
@media (min-width: 992px) {
    .navbar-nav .nav-item.dropdown {
        position: relative;
    }
    
    .navbar-nav .dropdown-menu {
        margin-top: 0;
        border: none;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }
    
    .navbar-nav .nav-item.dropdown:hover .dropdown-menu,
    .navbar-nav .nav-item.dropdown .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        display: block !important;
    }
    
    .navbar-nav .dropdown-item {
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    
    .navbar-nav .dropdown-item:hover {
        background-color: rgba(38, 130, 136, 0.1);
        color: #268288 !important;
    }
}

.navbar .container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.navbar-brand {
    font-size: 1.5rem;
    padding: 0;
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 180px;
    width: auto;
    object-fit: contain;
    display: block;
}

.navbar-nav {
    align-items: center;
    flex-direction: row;
}

.navbar-nav .nav-item {
    margin: 0 10px;
}

.navbar-buttons {
    align-items: center;
}

.btn-join-ioa {
    background-color: #882c26;
    border-color: #882c26;
    color: #fff;
}

.btn-join-ioa:hover {
    background-color: #6b221d;
    border-color: #6b221d;
    color: #fff;
}

.btn-join-ioa:focus,
.btn-join-ioa:active {
    background-color: #6b221d;
    border-color: #6b221d;
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(136, 44, 38, 0.5);
}

.navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, .1) 0%, rgba(51, 51, 51, .05) 100%), 
                url('../imgs/gregoryGroup.png') center/cover no-repeat;
    padding: 80px 0;
    margin-top: 0;
    scroll-margin-top: 200px;
    position: relative;
    min-height: 700px;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 5px;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #ffc107 !important;
    text-shadow: 0 0 8px #882c26;
}

/* Step Indicator for Forms */
.step-indicator {
    margin: 40px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.step.active .step-circle {
    background-color: var(--primary-color);
    color: white;
}

.step.completed .step-circle {
    background-color: #28a745;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step-line {
    flex: 1;
    height: 2px;
    background-color: #e9ecef;
    margin: 0 10px;
    margin-bottom: 35px;
}

/* Form Steps */
.form-step {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    box-shadow: 0 0.75rem 1rem rgba(0, 0, 0, 0.25) !important;
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0rem 1.5rem rgba(0, 0, 0, 0.35) !important;
    }
}

/* Override Bootstrap shadow utilities to be bolder */
.shadow-sm {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.35) !important;
}

.shadow-md {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.4) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.45) !important;
}

/* Buttons */
.btn {
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Gallery Images */
.gallery-section img {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .gallery-section img:hover {
        transform: scale(1.05);
        box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.4) !important;
    }
}

.gallery-img {
    height: 300px;
    object-fit: cover;
    width: 100%;
}

.carousel-inner {
    padding: 20px 0;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(38, 130, 136, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.carousel-indicators button {
    background-color: #268288;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

.carousel-indicators button.active {
    background-color: #882c26;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    transition: color 0.3s;
}

footer a:hover {
    color: #ffc107 !important;
}

/* Officer Cards */
.officer-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.officers-section .card img {
    transition: transform 0.3s;
}

@media (hover: hover) and (pointer: fine) {
    .officers-section .card:hover img {
        transform: scale(1.1);
    }
}

/* Bootstrap Primary Color Override */
.btn-primary {
    background-color: #6b221d;
    border-color: #6b221d;
}
.btn-facebook {
    background-color: #1877f2;
    border-color: #1877f2;
    color: #fff;
}
.btn-facebook:hover {
    background-color: #ffffff;
    border-color: #1877f2;
    color: #1877f2;
}
.btn-facebook:focus,
.btn-facebook:active {
    background-color: #1877f2;
    border-color: #1877f2;
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(24, 119, 242, 0.5);
}


.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1e6a70;
    border-color: #1e6a70;
}

.btn-primary:focus,
.btn-primary:active {
    box-shadow: 0 0 0 0.25rem rgba(38, 130, 136, 0.5);
}

.btn-outline-primary {
    color: #268288;
    border-color: #268288;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #268288;
    border-color: #268288;
    color: #fff;
}

.text-primary {
    color: #882c26 !important;
    border-color: #000000 !important;
}

.bg-primary {
    background-color: #268288 !important;
}

.border-primary {
    border-color: #268288 !important;
}

.badge.bg-primary {
    background-color: #268288 !important;
}

/* Form Validation */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(38, 130, 136, 0.25);
}

.invalid-feedback {
    display: block;
}

/* ========== Mobile-First Responsive Styles ========== */

/* Base: ensure no horizontal overflow, touch-friendly */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* Container padding on small screens */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 576px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Extra small devices (phones, < 576px) */
@media (max-width: 575.98px) {
    .navbar {
        min-height: auto;
        padding: 0.75rem 0;
    }

    .navbar .container {
        gap: 0;
    }

    .navbar-brand {
        flex: 1 1 auto;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        max-width: calc(100% - 60px);
    }

    .navbar-brand .display-4,
    .navbar-brand h1 {
        font-size: 0.9rem;
        line-height: 1.2;
        margin: 0;
        word-break: break-word;
    }

    .navbar-logo {
        height: 100px;
        min-width: 100px;
        margin-right: 0.5rem !important;
    }

    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }

    .hero-section {
        padding: 2.5rem 0;
        min-height: 320px;
        scroll-margin-top: 0;
    }

    .hero-section .display-6 {
        font-size: 1.25rem;
    }

    .display-4 {
        font-size: 1.75rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    /* Step indicator: stack vertically on very small screens */
    .step-indicator .d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .step-indicator .step {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 0.75rem;
    }

    .step-indicator .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .step-indicator .step-line {
        width: 2px;
        height: 20px;
        margin: 0 auto;
        margin-bottom: 0;
        align-self: center;
    }

    .step-indicator .step-label {
        font-size: 0.85rem;
        text-align: left;
    }

    /* Gallery: single image per slide on mobile */
    .gallery-section .carousel-item .row {
        flex-direction: column;
    }

    .gallery-section .carousel-item .col-md-4 {
        max-width: 100%;
    }

    .gallery-img {
        height: 220px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 15%;
        opacity: 1;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 40px;
        height: 40px;
    }

    /* Cards: reduce hover lift on touch devices, ensure padding */
    .card-body {
        padding: 1rem !important;
    }

    .card-body.p-4 {
        padding: 1rem !important;
    }

    .card-body.p-5 {
        padding: 1.25rem !important;
    }

    /* Forms: full-width buttons, comfortable spacing */
    .btn-lg {
        width: 100%;
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
    }

    .d-flex.justify-content-between .btn,
    .d-flex.justify-content-end .btn {
        width: 100%;
    }

    .membership-section form.bg-light,
    .membership-section .form-step {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #membershipForm.bg-light {
        padding: 1rem !important;
    }

    /* Officer cards */
    .officer-img {
        width: 100%;
        max-width: 200px;
        height: auto;
        aspect-ratio: 1;
    }

    /* Contact form */
    .contact-section .card-body.p-4 {
        padding: 1rem !important;
    }

    /* Modals: full width on mobile */
    .modal-dialog {
        margin: 0.5rem auto;
        max-width: calc(100% - 1rem);
    }

    /* Footer */
    footer .row.g-4 {
        gap: 1.5rem;
    }

    footer .col-md-4 {
        text-align: center;
    }

    footer .d-flex.gap-3 {
        justify-content: center;
    }
}

/* Small devices (landscape phones, 576px–768px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .navbar {
        min-height: 100px;
        padding: 0.5rem 0;
    }

    .navbar-brand .display-4,
    .navbar-brand h1 {
        font-size: 1.35rem;
    }

    .navbar-logo {
        height: 80px;
    }

    .hero-section {
        padding: 3rem 0;
        min-height: 400px;
        scroll-margin-top: 100px;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .step-circle {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .gallery-img {
        height: 260px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }
}

/* Tablets and up (768px–992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .navbar {
        min-height: 120px;
    }

    .navbar-logo {
        height: 100px;
    }

    .navbar-brand .display-4,
    .navbar-brand h1 {
        font-size: 1.5rem;
    }

    .hero-section {
        padding: 4rem 0;
        min-height: 500px;
        scroll-margin-top: 120px;
    }

    .display-4 {
        font-size: 2.25rem;
    }

    .gallery-section .carousel-item .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .gallery-section .carousel-item .row .col-md-4:last-child:nth-child(3n-1) {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Mobile: navbar collapsed menu */
@media (max-width: 991.98px) {
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        padding-top: 0.5rem;
    }

    .navbar-nav .nav-item {
        margin: 0.25rem 0;
        width: 100%;
        text-align: center;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }

    .navbar-collapse {
        margin-top: 0.5rem;
    }

    .navbar .d-md-none.mt-3 {
        margin-top: 0.75rem !important;
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .navbar .d-md-none .btn {
        flex: 1 1 auto;
        min-width: 140px;
    }
}

/* Ensure step buttons don't both go full width awkwardly (they're in justify-content-between) */
@media (max-width: 575.98px) {
    .form-step .d-flex.justify-content-between,
    .form-step .d-flex.justify-content-end {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-step .d-flex.justify-content-between .btn,
    .form-step .d-flex.justify-content-end .btn {
        width: 100%;
        margin: 0;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success Messages */
.alert-success {
    border-left: 4px solid #28a745;
}

/* Info Messages */
.alert-info {
    border-left: 4px solid #0dcaf0;
}

/* Past event cards - clickable */
.past-event-card {
    cursor: pointer;
}

.past-event-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Past event gallery modals – larger modal and images */
.past-event-gallery-modal {
    max-width: 98%;
    width: 1600px;
}

.past-event-gallery-modal .gallery-img {
    height: 560px;
    object-fit: cover;
}

@media (max-width: 575.98px) {
    .past-event-gallery-modal .gallery-img {
        height: 240px;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .past-event-gallery-modal .gallery-img {
        height: 320px;
    }
}


