* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #2d6c90;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.nav-links a:hover {
    color: #b8501a;
}

main {
    margin-top: 75px;
}

/* Smooth scrolling and offset for fixed header */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

.hero {
    background: #1E1E1E;
    color: #eceded;
    padding: 100px 0;
    text-align: left;
}

.hero-content {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    /* Give the hero headline more room so Typed.js strings don't wrap/reflow */
    max-width: 2400px;
    margin: 0 auto;
    padding: 0 20px;
    padding-left: 32px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    /* Reserve space so Typed.js never changes hero height */
    min-height: 2.4em; /* 2 lines */
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Typed.js styling */
#typed-strings {
    display: none;
}

#typed {
    color: #f47a23;
    font-weight: bold;
    
}

/* On smaller screens, reserve a bit more vertical space for wrapping */
@media (max-width: 900px) {
    .hero-content h1 {
        min-height: 3.6em; /* 3 lines */
    }

    .hero-content {
        padding-left: 20px;
    }
}

.hero-description {
    margin-top: 1rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.cta-button {
    background: #ea580c;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #dc2626;
}

.about, .team, .register, .programs, .testimonials, .support, .faq, .contact {
    padding: 80px 0;
}

.about {
    background: #eceded;
}

.about h2, .team h2, .register h2, .programs h2, .testimonials h2, .support h2, .faq h2, .contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2d6c90;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    margin-bottom: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
}

.archive-button {
    display: block;
    width: fit-content;
    margin: 1rem auto 0;
    background: #b8501a;
    color: white;
    padding: 12px 32px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background 0.3s;
}

.archive-button:hover {
    background: #f9c86a;
}

.about-photos {
    display: flex;
    gap: 2rem;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.about-photos::-webkit-scrollbar {
    height: 8px;
}

.about-photos::-webkit-scrollbar-track {
    background: #eceded;
    border-radius: 10px;
}

.about-photos::-webkit-scrollbar-thumb {
    background: #2d6c90;
    border-radius: 10px;
}

.about-photos::-webkit-scrollbar-thumb:hover {
    background: #b8501a;
}

.about-photo {
    width: calc((100% - 4rem) / 3);
    aspect-ratio: 1;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    object-fit: cover;
    flex-shrink: 0;
}

.team {
    background: white;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

/* First row: 3 items across (each spans 4 columns) */
.team-card-top {
    grid-column: span 4;
}

/* Second row: 4 items across (each spans 3 columns) */
.team-card:not(.team-card-top) {
    grid-column: span 3;
}

/* Flip card container */
.team-card {
    perspective: 1000px;
    min-height: 380px;
    cursor: pointer;
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 380px;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

/* Hover-to-flip on devices that actually support hover (desktop/laptop) */
@media (hover: hover) and (pointer: fine) {
    .team-card:hover .team-card-inner {
        transform: rotateY(180deg);
    }
}

.team-card.flipped .team-card-inner {
    transform: rotateY(180deg);
}

.team-card-front,
.team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.team-card-front {
    background: #eceded;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.team-card-front::after {
    content: "↺";
    position: absolute;
    right: 14px;
    bottom: 14px;
    font-size: 18px;
    line-height: 1;
    color: #2d6c90;
    opacity: 0.8;
    pointer-events: none;
}

.team-card:hover .team-card-front::after {
    opacity: 1;
}

.team-card:hover .team-card-front {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.team-card-back {
    background: #2d6c90;
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(180deg);
    overflow-y: auto;
}

.team-photo {
    width: min(200px, 100%);
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem auto;
    display: block;
    border: 4px solid #2d6c90;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.team-card h3 {
    color: #2d6c90;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    position: relative;
}

.team-card-front h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #b8501a;
    border-radius: 2px;
}

.team-role {
    font-size: 0.9rem;
    color: #b8501a;
    font-weight: bold;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: monospace;
}

.team-card-extra .team-role {
    font-size: 0.8rem;
}

.team-card-extra .team-bio {
    font-size: 0.95rem;
}
.team-bio {
    font-size: 1rem;
    line-height: 1.6;
    color: white;
    margin: 0;
    text-align: center;
}

.register {
    background: white;
    text-align: center;
}

.register h2 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
}

.register p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.register-status {
    margin-bottom: 0;
}

.register-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.register-button {
    background: #b8501a;
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s;
}

.register-button:hover {
    background: #f9c86a;
}

.spanish-text {
    font-size: 0.85em;
}

.register-button .spanish-text {
    font-size: 0.85em;
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.program-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.program-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.program-card h3 {
    color: #b8501a;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    position: relative;
}

.program-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #2d6c90;
    border-radius: 2px;
}

.program-card a {
    color: #2d6c90;
    text-decoration: underline;
}

.program-card a:hover {
    color: #b8501a;
}

.programs {
    background: #eceded;
}

.programs p {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.testimonials {
    background: white;
}

.testimonial-grid {
    display: flex;
    gap: 2rem;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-top: 3rem;
}

.testimonial-grid::-webkit-scrollbar {
    height: 8px;
}

.testimonial-grid::-webkit-scrollbar-track {
    background: white;
    border-radius: 10px;
}

.testimonial-grid::-webkit-scrollbar-thumb {
    background: #2d6c90;
    border-radius: 10px;
}

.testimonial-grid::-webkit-scrollbar-thumb:hover {
    background: #b8501a;
}

.testimonial-card {
    background: linear-gradient(145deg, #f8fafc, #eceded);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-align: left;
    border-left: 4px solid #b8501a;
    width: calc((100% - 4rem) / 3);
    min-width: 300px;
    flex-shrink: 0;
}

.testimonial-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: #333;
}

.testimonial-author {
    text-align: right;
    color: #2d6c90;
    font-size: 0.9rem;
}

.support {
    background: #eceded;
    text-align: center;
}

.support p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
}

.support-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.support-button {
    background: #b8501a;
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
}

.support-button:hover {
    background: #f9c86a;
}

.faq {
    background: white;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #eceded;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2d6c90;
    text-align: left;
    transition: background 0.3s;
    font-family: monospace;
}

.faq-question:hover {
    background: #dcdcdc;
}

.faq-question.active {
    background: #eceded;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: #b8501a;
    transition: transform 0.3s;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #eceded;
}

.faq-answer.open {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.faq-answer p {
    padding: 1.5rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.faq-answer a {
    color: #2d6c90;
    text-decoration: underline;
}

.faq-answer a:hover {
    color: #b8501a;
}

.contact {
    background: #eceded;
    text-align: center;
}

.contact p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 1rem auto;
}

.contact-email {
    margin-bottom: 0.5rem;
}

.linkedin-follow {
    display: inline-block;
    margin-top: 0.25rem;
    /* LinkedIn FollowCompany widget is small by default */
    transform: scale(1.5);
    transform-origin: center;
}

@media (max-width: 900px) {
    .linkedin-follow {
        transform: scale(1.3);
    }
}

.contact-info {
    margin-top: 2rem;
    text-align: center;
}

.contact-info p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

footer {
    background: #2d6c90;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Hamburger menu styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

@media (max-width: 1200px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: #2d6c90;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 0.25rem 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }
    
    /* Keep hero headline text size constant across breakpoints */
    
    .program-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-grid {
        flex-direction: row;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        width: calc((100% - 1.5rem) / 2);
        min-width: 280px;
    }
    
    .team-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
    }
    
    /* On tablets: maintain the same layout structure */
    .team-card-top {
        grid-column: span 4;
    }
    
    .team-card:not(.team-card-top) {
        grid-column: span 3;
    }
    
    .team-photo {
        width: min(150px, 100%);
        aspect-ratio: 1 / 1;
        height: auto;
    }
    
    /* Adjust scroll padding for mobile */
    html {
        scroll-padding-top: 120px;
    }
    
    /* Increase main margin for mobile if nav wraps */
    main {
        margin-top: 75px;
    }

    /* About section mobile styles */
    .about-photos {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }

    .about-photo {
        width: calc((100% - 1.5rem) / 2);
        aspect-ratio: 1;
    }
}

/* Team View More button - hidden by default on desktop */
.team-view-more-btn {
    display: none;
}

/* Stack team cards on smaller screens */
@media (max-width: 900px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .team-card-top,
    .team-card:not(.team-card-top) {
        grid-column: span 1;
    }

    .team-photo {
        margin-left: auto;
        margin-right: auto;
    }

    /* Hide extra team members on mobile by default */
    .team-card-extra {
        display: none;
    }

    /* Show extra team members when expanded */
    .team-grid.expanded .team-card-extra {
        display: block;
    }

    /* Show the View More button on mobile */
    .team-view-more-btn {
        display: block;
        margin: 2rem auto 0;
        padding: 0.875rem 2rem;
        background: #2d6c90;
        color: white;
        border: none;
        border-radius: 25px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.3s, transform 0.3s;
    }

    .team-view-more-btn:hover {
        background: #245a78;
        transform: translateY(-2px);
    }

    /* Toggle text visibility */
    .team-view-more-btn .view-less-text {
        display: none;
    }

    .team-view-more-btn.expanded .view-more-text {
        display: none;
    }

    .team-view-more-btn.expanded .view-less-text {
        display: inline;
    }
}