/* Responsive Design */

/*
 * SENIOR DEV NOTE:
 * The primary breakpoint has been updated from 768px to 1024px.
 * This ensures that tablets like the iPad render the mobile-first layout for all sections.
 * Styles from the old 768px block have been merged into this one for consistency.
*/
@media (max-width: 1024px) {
    /* --- Styles for Tablets and All Mobile Devices --- */

    /* Audio Controls & Navigation */
    .audio-controls {
        display: none !important;
    }
    
    .mobile-audio-control {
        display: flex !important;
    }

    .nav-menu, .login-btn {
        display: none;
    }

    nav {
        padding: 0.8rem 0;
    }

    .mobile-menu {
        display: flex;
    }
    
    /* General Layout */
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 40px 25px;
        margin: 15px 10px 25px 10px;
        background-attachment: scroll; /* Better performance on tablets */
    }

    .hero h2 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: clamp(1rem, 2vw, 1.15rem);
    }

    /* Service Panels Layout */
    .services-panels {
        grid-template-columns: 1fr; /* Force a single-column layout */
        padding: 15px 15px 40px 15px;
        gap: 30px;
    }

    .service-panel {
        margin: 0 10px;
        min-height: auto;
    }

    .panel-content {
        padding: 2rem 1.8rem;
    }

    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        margin: -40px auto 20px auto;
    }

    .panel-content .subtitle {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .unified-content {
        font-size: 1rem;
        line-height: 1.6;
        padding: 22px;
    }

    .panel-image {
        height: 220px;
    }

    /* Team Section Layout for Tablets/Mobile */
    .team-content {
        padding: 2rem 1.5rem;
    }

    .team-member-card {
        padding: 2rem 1.5rem;
    }

    .member-photo-container {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }

    .photo-icon {
        font-size: 2.5rem;
    }

    .member-name {
        font-size: 1.5rem;
    }

    .member-role {
        font-size: 1.1rem;
        margin-bottom: 1.2rem;
    }

    .member-details {
        padding: 1.5rem;
    }

    .member-details p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .experience-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Team Section for larger screens (stacks earlier than other content) */
@media (max-width: 1200px) {
    .team-members {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* --- Styles for Smaller Mobile Phones --- */
@media (max-width: 480px) {
    .team-members {
        gap: 2rem;
    }

    .team-member-card {
        padding: 1.5rem 1rem;
    }

    .member-photo-container {
        width: 100px;
        height: 100px;
    }

    .photo-icon {
        font-size: 2rem;
    }

    .photo-text {
        font-size: 0.7rem;
    }

    .member-name {
        font-size: 1.3rem;
    }

    .member-role {
        font-size: 1rem;
    }

    .member-details {
        padding: 1.2rem;
    }

    .member-details p {
        font-size: 0.9rem;
    }

    #backToTopBtn {
        width: 45px;
        height: 45px;
        right: 20px;
        bottom: 20px;
        font-size: 1rem;
    }
}

/*
 * SENIOR DEV NOTE:
 * Updated from 769px to 1025px to match the new tablet breakpoint.
*/
@media (min-width: 1025px) {
    .mobile-audio-control {
        display: none !important;
    }
}