/* Mobile View Optimization - HAND at UCLA */

/* General Mobile */
@media (max-width: 768px) {
    body, p {
        font-size: 0.95rem;
        line-height: 1.6rem;
    }

    h1 {
        font-size: 2rem;
        line-height: 2.5rem;
    }

    h2 {
        font-size: 1.7rem;
        line-height: 2.2rem;
    }

    h3 {
        font-size: 1.4rem;
        line-height: 1.9rem;
    }

    h4 {
        font-size: 1.1rem;
        line-height: 1.7rem;
    }

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    body {
        overflow-x: hidden;
    }
}

/* Navbar */
@media (max-width: 991px) {
    .navbar-custom {
        background-color: #fff !important;
        padding: 0.75rem 1rem;
        box-shadow: 0 0.0625rem 0.375rem rgba(0,0,0,0.1);
    }

    .navbar-brand.logo-image img {
        width: 400px;
        height: auto;
    }

    .navbar-custom .nav-item .nav-link {
        padding: 0.85rem 1rem;
        font-size: 1rem;
        text-align: center !important;
        color: #393939 !important;
    }

    .navbar-custom .dropdown-menu {
        display: none;
        position: static;
        width: 100% !important;
        text-align: center !important;
        background-color: #f8f9fa;
        border: none;
        border-top: 2px solid #00bfd8;
        box-shadow: none;
        padding: 0.5rem 0 !important;
    }

    .navbar-custom .dropdown.show > .dropdown-menu {
        display: block;
    }

    .navbar-custom .dropdown:hover > .dropdown-menu {
        display: none;
    }

    .navbar-custom .dropdown-item {
        text-align: center !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem;
    }

    .navbar-custom .dropdown-item .item-text {
        display: block;
        text-align: center !important;
    }

    .navbar-custom .dropdown-items-divide-hr {
        margin: 0.35rem auto;
        width: 80%;
        background-color: rgba(0,191,216,0.25);
        opacity: 1;
    }
}

/* Header */
@media (max-width: 768px) {
    .ex-header {
        padding-top: 8rem !important;
        padding-bottom: 4rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        text-align: center;
    }

    .ex-header h1 {
        font-size: 1.9rem !important;
        line-height: 2.4rem !important;
        width: 95% !important;
        margin: 0 auto !important;
    }
}

/* Sections */
@media (max-width: 768px) {
    .basic-1,
    .basic-2,
    .basic-3,
    .basic-4,
    .cards-1,
    .cards-2,
    .form-1,
    .form-2,
    .ex-basic-2 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .basic-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .row {
        margin-bottom: 1.5rem;
    }

    .text-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Images */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }

    .image-container {
        text-align: center;
        margin-bottom: 2rem;
    }

    .image-container img,
    .img-fluid {
        max-width: 100% !important;
        height: auto !important;
        margin-left: auto;
        margin-right: auto;
    }

    .basic-4 > .image-container img {
        width: 90% !important;
        max-width: 430px !important;
    }

    .basic-4 .container > img {
        width: 95% !important;
        max-width: 460px !important;
    }
}

/* Speaker Photos */
@media (max-width: 768px) {
    .basic-4 .team-member {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 3rem;
    }

    .basic-4 .image-wrapper {
        width: 240px;
        height: 240px;
        max-width: 240px;
        max-height: 240px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1.25rem;
        border-radius: 50%;
    }

    .basic-4 .image-wrapper img {
        width: 240px !important;
        height: 240px !important;
        object-fit: cover;
        border-radius: 50%;
    }

    .basic-4 .team-member .p-large {
        font-size: 1.05rem;
        line-height: 1.45rem;
    }

    .basic-4 .team-member .job-title {
        font-size: 0.95rem;
        line-height: 1.4rem;
    }
}

/* News Box */
@media (max-width: 768px) {
    .basic-4 div[style*="background"] {
        padding: 1.75rem !important;
        margin: 0 auto;
    }

    .basic-4 div[style*="background"] img {
        margin-top: 1.5rem;
        width: 95% !important;
    }
}

/* Buttons */
@media (max-width: 768px) {
    .btn-solid-lg,
    .btn-solid-reg,
    .btn-outline-lg,
    .btn-outline-reg {
        padding: 0.95rem 1.5rem;
        font-size: 0.8rem;
        line-height: 1rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    button,
    .btn,
    .navbar-toggler {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Footer */
@media (max-width: 768px) {
    .footer {
        text-align: center;
        padding-top: 2.5rem;
        padding-bottom: 1.5rem;
    }

    .footer .footer-col {
        width: 100%;
        margin: 0 auto 1rem auto;
    }

    .footer h4,
    .footer h5 {
        text-align: center;
        font-size: 1rem;
    }

    .footer .fa-stack {
        font-size: 1.35rem;
        margin: 0 0.35rem 0.75rem 0.35rem;
    }
}

/* Extra Small Phones */
@media (max-width: 576px) {
    body, p {
        font-size: 0.9rem;
        line-height: 1.55rem;
    }

    h1 {
        font-size: 1.75rem;
        line-height: 2.25rem;
    }

    h2 {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    h3 {
        font-size: 1.3rem;
        line-height: 1.75rem;
    }

    h4 {
        font-size: 1rem;
        line-height: 1.6rem;
    }

    .navbar-brand.logo-image img {
        width: 405px;
    }

    .ex-header {
        padding-top: 7.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    .ex-header h1 {
        font-size: 1.55rem !important;
        line-height: 2rem !important;
    }

    .basic-4 .image-wrapper,
    .basic-4 .image-wrapper img {
        width: 210px !important;
        height: 210px !important;
    }

    .basic-4 .team-member {
        max-width: 300px;
    }

    .btn-solid-lg,
    .btn-solid-reg,
    .btn-outline-lg,
    .btn-outline-reg {
        width: auto;
        max-width: 100%;
    }
}

.education-header .section-title {
    color: #00bfd8;
    font-size: 2.8rem;
    font-weight: 700;
}
.education-header {
    padding-top: 40px;
    padding-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 191, 216, 0.05), #fff);
}

.education-header {
    padding-top: 40px;
    padding-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 191, 216, 0.05), #fff);
}

.ex-header {
    padding-top: 40px;
    padding-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 191, 216, 0.05), #fff);
}

.ex-header h1 {
    color: #00bfd8;
    font-size: 2.8rem;
    font-weight: 700;
}
/* Make ex-header match education-header */
.ex-header {
    padding: 40px 0 !important;
    text-align: center !important;
    background: linear-gradient(135deg, rgba(0, 191, 216, 0.05), #fff) !important;
}

.ex-header h1 {
    color: #00bfd8 !important;
    font-size: 2.8rem !important;
    font-weight: 700 !important;
    line-height: 3.2rem !important;
    margin-bottom: 1rem !important;
}

.ex-header .p-large {
    color: #00bfd8 !important;
    font-size: 1.3rem !important;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
}

@media (max-width: 576px) {
    .ex-header {
        padding: 40px 1rem !important;
    }

    .ex-header h1 {
        font-size: 2rem !important;
        line-height: 2.4rem !important;
    }

    .ex-header .p-large {
        font-size: 1.1rem !important;
    }
}
.navbar-custom.top-nav-collapse {
    background: #fff !important;
    box-shadow: 0 0.0625rem 0.375rem rgba(0,0,0,0.1) !important;
}
.education-header {
    margin-top: 90px;
    padding: 40px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 191, 216, 0.05), #fff);
}

.education-header .section-title {
    color: #00bfd8;
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
}
@media (max-width: 768px) {
    .education-header {
        margin-top: 120px;
    }
}
/* Consistent page headers */
.education-header,
.ex-header {
    margin-top: 30px;
    padding: 100px 0 70px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 191, 216, 0.05), #fff);
}

.education-header .section-title,
.ex-header h1 {
    color: #00bfd8;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 3.2rem;
    margin-bottom: 1rem;
}

.ex-header .p-large {
    color: #00bfd8;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0;
}

/* Mobile page headers */
@media (max-width: 768px) {
    .education-header,
    .ex-header {
        margin-top: 90px;
        padding: 70px 1rem 50px 1rem;
    }

    .education-header .section-title,
    .ex-header h1 {
        font-size: 2rem;
        line-height: 2.4rem;
    }

    .ex-header .p-large {
        font-size: 1.1rem;
    }
}
/* Final page header fix */
.education-header,
#header.ex-header {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    margin-top: 0 !important;
    padding: 180px 1rem 70px 1rem !important;

    text-align: center;
    background: linear-gradient(
        90deg,
        rgba(0,191,216,0.08) 0%,
        rgba(0,191,216,0.04) 50%,
        rgba(255,255,255,1) 100%
    ) !important;
}

.education-header .section-title,
#header.ex-header h1 {
    color: #00bfd8 !important;
    font-size: 2.8rem !important;
    font-weight: 700 !important;
    line-height: 3.2rem !important;
    margin-bottom: 1rem !important;
}

#header.ex-header .p-large {
    color: #626262 !important;
    font-size: 1.3rem !important;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .education-header,
    #header.ex-header {
        padding: 150px 1rem 50px 1rem !important;
    }

    .education-header .section-title,
    #header.ex-header h1 {
        font-size: 2rem !important;
        line-height: 2.4rem !important;
    }
}