/* ============================================
   RIGGS PEDIATRIC THERAPY - MASTER STYLESHEET
   Cleaned and reorganized for better maintainability
   ============================================ */

/* --- 1. GLOBAL STYLES & CSS RESET --- */
@tailwind base;
@tailwind components;
@tailwind utilities;

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #2D9CDB;
    --secondary-color: #F2994A;
    --background-light: #FFFACD;
    --text-dark: #333333;
    --header-height: 80px;
    --accent-color-light: #FFE599;
    --bright-green: #79a838;
}

html { 
    min-height: 100%; 
}

body {
    font-family: 'Quicksand', sans-serif;
    color: var(--text-dark);
    margin: 0;
    padding-top: var(--header-height);
    line-height: 1.6;
    background: linear-gradient(180deg,
        #E6F3FB 0%,
        #FFF8E1 20%,
        #FFF0D4 40%,
        #E8F0F8 70%,
        #D4EBFF 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% 100vh;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        #E6F3FB 0%,
        #FFF8E1 20%,
        #FFF0D4 40%,
        #E8F0F8 70%,
        #D4EBFF 100%);
    z-index: -1;
    pointer-events: none;
}

/* --- 2. TYPOGRAPHY --- */
h2 { 
    font-family: 'Poppins', sans-serif; 
    font-size: 2.5rem; 
    font-weight: 800; 
    text-align: center; 
    margin-bottom: 3rem; 
}

.section-subtitle {
    font-style: italic;
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

/* --- 3. HEADER & NAVIGATION --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3%; 
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100; 
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    flex-shrink: 0; 
}

.desktop-nav a,
nav a {
    margin-left: 0.75rem; 
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--secondary-color);
}

.cta-nav {
    background-color: var(--secondary-color);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: background-color 0.3s;
}

.cta-nav:hover {
    background-color: #e08b3c;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 10px;
    z-index: 101;
}

.mobile-nav {
    display: none; 
}

/* --- 4. BUTTONS & CTAs --- */
.button {
    display: inline-block;
    padding: 1rem 2rem;
    margin-top: 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-cta {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(45, 156, 219, 0.3);
}

.primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(45, 156, 219, 0.4);
}

.secondary-cta {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(242, 153, 74, 0.3);
}

.secondary-cta:hover {
    background-color: #e08b3c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(242, 153, 74, 0.4);
}

/* --- 4.5 CONTACT BUTTONS SECTION --- */
.contact-buttons-section {
    padding: 1rem 5% 0.5rem;
    background: transparent;
}

.contact-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.contact-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    gap: 0.75rem;
    min-width: 140px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.contact-button:active {
    transform: translateY(-1px);
}

.contact-button i {
    font-size: 1.5rem;
    pointer-events: none;
}

.contact-button .contact-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    pointer-events: none;
}

.phone-button i {
    color: var(--bright-green);
}

.email-button i {
    color: var(--secondary-color);
}

.map-button i {
    color: var(--primary-color);
}

.phone-button:hover {
    background: linear-gradient(135deg, #f0fff4 0%, white 100%);
}

.email-button:hover {
    background: linear-gradient(135deg, #fff8f0 0%, white 100%);
}

.map-button:hover {
    background: linear-gradient(135deg, #f0f9ff 0%, white 100%);
}

/* Header Contact Info (Desktop Only) */
.header-contact-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-right: 2rem;
}

.header-contact-info a {
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s;
}

.header-contact-info a:hover {
    color: var(--primary-color);
}

.header-contact-info i {
    font-size: 0.85rem;
}

/* --- 5. HERO SECTION & CAROUSEL (COMMENTED OUT BUT KEEPING STYLES) --- */
.hero-section {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 5% 5%;
    background: transparent;/*linear-gradient(180deg, #E6F3FB 0%, var(--background-light) 100%);*/
    min-height: calc(80vh - var(--header-height)); 
}

.hero-content {
    flex: 1;
    max-width: 50%;
}

.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 2rem;
}

.carousel-container {
    flex: 1;
    max-width: 45%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: white;
    aspect-ratio: 4/3; 
    max-height: min(65vh, 720px);
    width: clamp(320px, 45%, 900px);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    position: relative;
}

.slide-image-wrapper {
    flex: 1.8;
    position: relative;
    overflow: hidden;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-text-content {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.slide-text-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.9rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

.slide-text-content p {
    font-size: 1rem;
    color: white;
    margin-bottom: 1.5rem;
}

.slide-cta {
    background-color: #ff6e40;
    color: white !important;
    padding: 0.8rem 1.5rem;
    margin-top: 0.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

.slide-cta:hover {
    background-color: #e05e35;
}

.svg-decoration {
    position: absolute;
    width: 50px;
    height: 50px;
    opacity: 0.8;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
    z-index: 1;
}

.slide-text-content .svg-decoration:first-of-type {
    top: 20px;
    right: 20px;
}

.slide-text-content .svg-decoration:last-of-type {
    bottom: 20px;
    left: 20px;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    line-height: 1;
    transition: background-color 0.3s;
    border-radius: 50%;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev { left: 15px; }
.next { right: 15px; }

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.dot.active {
    background-color: var(--secondary-color);
    transform: scale(1.2);
}

/* --- 6. WELCOME SECTION --- */
.welcome-section {
    padding: 2rem 5% 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    text-align: center;
    background: transparent;
}

.welcome-content {
    flex: 1;
    max-width: 450px;
    text-align: center;
}

.welcome-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    line-height: 1;
    margin: 0;
    font-weight: 900;
    text-transform: uppercase;
}

.welcome-tagline {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin: 0.5rem 0 1.5rem 0;
}

.welcome-content p {
    font-size: 1rem;
    color: #777;
    margin-bottom: 0;
}

.welcome-image-wrapper {
    flex: 1;
    max-width: 40%;
    overflow: hidden;
}

.welcome-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* --- 7. CLINIC SECTION & FOLDER GALLERY --- */
.clinic-section {
    padding: 2rem 5% 4rem;
    text-align: center;
    background: transparent;
}

.folder-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.folder-wrapper {
    display: flex;
    gap: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    overflow: hidden;
}

.folder-main {
    flex: 1;
    background: #f5e6d3;
    border-radius: 15px 0 0 15px;
    min-height: 600px;
    position: relative;
}

.folder-body {
    width: 100%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 30px;
}

.folder-content {
    display: none;
    width: 100%;
    max-width: 700px;
}

.folder-content.active {
    display: block;
}

.folder-title {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 25px;
    color: #5a4a3a;
    border-bottom: 3px solid var(--folder-tab-border);
    padding-bottom: 12px;
    font-weight: bold;
    text-align: center;
}

.folder-content .carousel {
    position: relative;
    width: 100%;
    height: 400px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.carousel-images {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.carousel-image.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-indicators {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d4c4a8;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.indicator:hover {
    background: #ffa94d;
    transform: scale(1.2);
}

.indicator.active {
    background: #ffa94d;
    transform: scale(1.4);
    border-color: #ff8c1a;
}

.folder-tabs {
    display: flex;
    flex-direction: column;
    height: 600px;
    font-family: var(--folder-tab);
}

.folder-tab {
    flex: 1;
    background: linear-gradient(to right, #d4c4a8, #e0d0bc);
    color: #5a4a3a;
    border: none;
    padding: 20px 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    font-family: var(--folder-tab);
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-left: 4px solid #bfb199;
    position: relative;
    opacity: 0.7;
}

.folder-tab:first-child {
    border-radius: 0 15px 0 0;
}

.folder-tab:last-child {
    border-radius: 0 0 15px 0;
}

.folder-tab:hover {
    background: linear-gradient(to right, #e0d0bc, #ecddc8);
    transform: scale(1.02);
    opacity: 0.9;
}

.folder-tab.active {
    background: linear-gradient(to right, #f5e6d3, #fff8f0);
    box-shadow: inset 5px 0 15px rgba(255, 169, 77, 0.3);
    margin-left: -4px;
    padding-left: 20px;
    z-index: 10;
    border-left: 6px solid #ffa94d;
    opacity: 1;
    transform: scale(1.05);
}

.loading-message {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #666;
}

/* --- 8. SERVICES SECTION --- */
.services-section {
    padding: 40px 20px;
    text-align: center;
    background: transparent;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
}

.service-card { 
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-color: white; 
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.service-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.service-card:hover img {
    opacity: 0.8;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 15px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.service-card:hover .overlay {
    transform: translateY(0);
}

.overlay h3 {
    margin: 0;
    font-size: 1.5rem;
}

.overlay p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    font-weight: 300;
}

/* --- 9. TEAM SECTION --- */
.team-section {
    padding: 40px 20px;
    text-align: center;
    background: transparent;
}

.team-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
}

.team-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 30px;
    margin-top: 20px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* Force 3 columns on larger screens */
@media (min-width: 900px) {
    .team-member-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.member-card {
    text-align: center;
    overflow: hidden; 
    background-color: white;
    border-radius: 12px;
    padding: 15px 15px 10px 15px; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.member-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.member-card .member-image {
    width: 100%;
    aspect-ratio: 4 / 5; 
    object-fit: cover; 
    object-position: center top; 
    height: auto !important; 
    display: block;
}

.member-info {
    padding: 15px 10px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.member-info h4 {
    margin: 5px 0;
    font-size: 1.1rem;
    color: var(--primary-color);
    word-wrap: break-word;
}

.member-info p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    color: #666;
    word-wrap: break-word;
    line-height: 1.3;
}

/* --- 10. MODALS --- */
.service-modal, 
.team-modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; 
    background-color: rgba(0,0,0,0.4); 
    opacity: 0; 
    transition: opacity 0.3s ease-out;
}

.service-modal.active, 
.team-modal.active {
    display: flex; 
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.service-modal.closing, 
.team-modal.closing {
    opacity: 0;
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90vh; 
    overflow-y: auto; 
    margin: auto;
}

.large-modal { 
    max-width: 800px; 
} 

.small-modal { 
    max-width: 600px; 
}

.modal-close, 
.modal-close-team, 
.modal-close-bio {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover,
.modal-close-team:hover,
.modal-close-bio:hover {
    color: #333;
}

/* Modal Content Styling */
#modalBody h1, 
#bioBody h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

#modalBody h2, 
#bioBody h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
}

#modalBody p, 
#bioBody p {
    margin-bottom: 1rem;
}

#modalBody a, 
#bioBody a {
    display: block; 
    width: fit-content; 
    padding: 10px 20px;
    margin: 15px auto;
    background-color: var(--primary-color);
    color: white; 
    text-decoration: none;
    border-radius: 8px; 
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease;
}

#modalBody a:hover, 
#bioBody a:hover {
    background-color: var(--secondary-color);
}

#modalBody .ql-align-center, 
#bioBody .ql-align-center {
    text-align: center;
}

#modalBody .ql-align-right, 
#bioBody .ql-align-right {
    text-align: right;
}

#bioBody .bio-image {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    object-position: center top; 
    border-radius: 50%;
    margin: 0 auto 20px auto; 
    display: block; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.team-modal #teamModalTitle {
    font-family: 'Poppins', sans-serif; 
    font-size: 2.5rem; 
    font-weight: 800; 
    text-align: center; 
    color: var(--logo-color); 
    border-bottom: 2px solid var(--logo-color); 
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 40px; 
}

/* --- 11. LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(255,255,255,0.2);
    border-radius: 15px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* --- 12. FOOTER --- */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 5% 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 3rem;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    text-align: left;
    color: white;
    margin-top: 0;
}

.contact-info a {
    display: flex;           /* Aligns icon and text nicely */
    align-items: center;
    gap: 0.5rem;
    color: white;            /* Keeps them white */
    text-decoration: none;   /* Removes underline */
    margin-bottom: 1rem;     /* Spacing between lines */
    width: fit-content;      /* Only as wide as the text */
    transition: opacity 0.3s;
}

.contact-info a:hover {
    opacity: 0.8;            /* Slight fade on hover */
    text-decoration: underline;
}

.contact-info a i {
    width: 20px;             /* Aligns icons if they have different widths */
    text-align: center;
}

.contact-map-container {
    flex: 1;
    min-height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: #f0f0f0;
    display: flex;
}

.contact-map-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 450px;
}

.contact-form-placeholder {
    flex: 1;
}

.contact-form-placeholder form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form-placeholder input, 
.contact-form-placeholder textarea {
    padding: 0.75rem;
    border-radius: 8px;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
}

.contact-form-placeholder textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form-placeholder .button {
    background-color: var(--secondary-color);
    color: white;
    margin-top: 0;
}

/* --- CERTIFICATIONS SECTION (NEW) --- */
.certifications-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem auto;
    padding: 1rem 0;
    flex-wrap: wrap;
    max-width: 1000px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.certification-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

/* If you prefer original colors, remove the filter line above */
.certification-logo:hover {
    opacity: 1;
}


.copyright {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
}

/* ============================================
   13. MOBILE RESPONSIVE STYLES
   ============================================ */

/* --- TABLET & BELOW (1024px) --- */
@media (max-width: 1024px) {
    /* Contact Buttons */
    .contact-buttons-container {
        gap: 1.25rem;
    }
    
    .contact-button {
        min-width: 130px;
        padding: 0.65rem 1.25rem;
    }
    
    .contact-button i {
        font-size: 1.35rem;
    }
    
    .contact-button .contact-text {
        font-size: 0.85rem;
    }
    
    /* Hero Section */
    .hero-section { 
        flex-direction: column; 
        text-align: center; 
        padding: 5% 3%; 
    }
    
    .hero-content { 
        max-width: 100%; 
        margin-bottom: 2rem; 
    }
    
    .hero-content h1 { 
        font-size: 2.5rem; 
    }
    
    /* Carousel - Full Overlay on Mobile */
    .carousel-container { 
        max-width: 100%;
        max-height: 70vh;
        aspect-ratio: 4/3;
    }

    .carousel-slide { 
        display: block !important; 
        position: relative !important; 
    }

    .slide-image-wrapper { 
        width: 100% !important;
        height: 100% !important;
        flex: none !important;
        position: absolute !important;
    }
    
    .slide-text-content { 
        flex: none !important;
        position: absolute !important; 
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important; 
        justify-content: flex-end !important; 
        padding-bottom: 15% !important;
        padding: 1.5rem !important; 
        box-sizing: border-box !important;
    }

    .slide-text-content h3 { 
        font-size: 1.5rem; 
    }
    
    .slide-text-content p {
        font-size: 1rem;
    }
    
    /* Hide carousel arrows on mobile hero */
    .hero-section > .carousel-button.prev,
    .hero-section > .carousel-button.next {
        display: none !important;
    }
    
    .hero-section > .carousel-dots {
        display: none !important;
    }
    
    .carousel-container .carousel-dots {
        display: flex !important;
    }
    
    /* Welcome Section */
    .welcome-section { 
        flex-direction: column; 
        gap: 2rem; 
    }
    
    .welcome-content, 
    .welcome-image-wrapper { 
        max-width: 100%; 
    }
    
    .welcome-content h2 { 
        font-size: 2.5rem; 
    }
    
    /* Footer */
    .footer-content { 
        flex-direction: column; 
    }
    
    .contact-info,
    .contact-map-container {
        margin-bottom: 2rem;
    }
    
    .contact-map-container {
        min-height: 300px;
    }
    
    /* Folder Gallery */
    .folder-main {
        min-height: 500px;
    }
    
    .folder-body {
        padding: 20px;
    }
    
    .folder-tabs {
        height: 500px;
    }
    
    .folder-tab {
        font-size: 14px;
        padding: 16px 12px;
    }
    
    .folder-content .carousel {
        height: 300px;
    }
}

/* --- MOBILE (768px) --- */
@media (max-width: 768px) {
    /* Header Contact Info - Hide on mobile */
    .header-contact-info {
        display: none;
    }
    
    /* Contact Buttons - Stack vertically on mobile */
    .contact-buttons-section {
        padding: 1rem 5% 0.5rem;
    }
    
    .contact-buttons-container {
        flex-direction: row;
        gap: 1.5rem;
        max-width: 100%;
        justify-content: center;
    }
    
    .contact-button {
        width: 60px;
        min-width: 60px;
        height: 60px;
        padding: 0;
        border-radius: 50%;
    }
 
    .contact-button .contact-text {
        display: none;
    }
    
    .contact-button i {
        font-size: 1.5rem;
    }
    
    .contact-button .contact-text {
        font-size: 0.9rem;
    }
    
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden !important;
    }
    
    .hero-section,
    .welcome-section,
    .clinic-section,
    .services-section,
    .team-section {
        overflow-x: hidden !important;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* IMPROVED FOLDER VIEW FOR MOBILE */
    .folder-container {
        padding: 0 !important;
        max-width: 100% !important;
        overflow: visible !important;
        box-sizing: border-box;
    }
    
    .folder-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
        flex-direction: column;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    
    .folder-main {
        width: 100% !important;
        box-sizing: border-box;
        border-radius: 15px 15px 0 0;
        min-height: 450px;
    }
    
    .folder-body {
        padding: 15px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .folder-content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .folder-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .folder-content .carousel {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        height: 300px;
    }
    
    .carousel-images {
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .carousel-image {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    .folder-content .carousel-indicators {
        max-width: 100% !important;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
        justify-content: center;
        box-sizing: border-box;
        display: flex;
        flex-wrap: wrap;
    }
    
    .indicator {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    /*.folder-tabs {
        width: 100% !important;
        height: auto;
        flex-direction: row;
        overflow-x: auto !important;
        overflow-y: hidden;
        display: flex !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        background: #d4c4a8;
        border-radius: 0 0 15px 15px;
    }*/

    .folder-tabs {
        width: 100% !important;
        height: auto;
        flex-direction: row;
        overflow-x: hidden !important;     /* Changed from 'auto' */
        overflow-y: hidden;
        display: flex !important;
        flex-wrap: wrap !important;       /* Changed from 'nowrap' */
        justify-content: center;        /* Added to center the tabs */
        -webkit-overflow-scrolling: touch;
    }
    
    .folder-tab {
        flex: 1 0 auto !important;
        min-width: 80px;
        white-space: nowrap;
        writing-mode: horizontal-tb;
        text-orientation: initial;
        font-size: 12px;
        padding: 14px 10px;
        border-left: none;
        border-top: none;
        border-bottom: 4px solid #bfb199;
        cursor: pointer;
        touch-action: manipulation;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .folder-tab:first-child {
        border-radius: 0 0 0 15px;
    }

    .folder-tab:last-child {
        border-radius: 0 0 15px 0;
    }

    .folder-tab.active {
        margin-left: 0;
        margin-top: 0;
        margin-bottom: -4px;
        padding-left: 10px;
        padding-bottom: 18px;
        border-left: none;
        border-bottom: 6px solid #ffa94d;
        box-shadow: inset 0 -5px 15px rgba(255, 169, 77, 0.3);
    }
    
    /* Service Cards - Always Show Overlay on Mobile */
    .service-card {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .service-card .overlay {
        transform: translateY(0) !important;
        background: rgba(0, 0, 0, 0.75); 
    }
    
    .service-card:hover .overlay {
        transform: translateY(0);
    }
    
    .service-card {
        width: 100%; 
    }
    
    /* Team Cards */
    .team-member-card {
        width: calc(50% - 15px);
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .team-group-card {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .member-card {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* WIDER MODALS ON MOBILE */
    .service-modal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 85vh !important;
        padding: 25px 20px !important;
        margin: 20px auto !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
    }
    
    .team-modal .modal-content.large-modal {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 85vh !important;
        padding: 25px 20px !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
    }
    
    .team-modal .modal-content.small-modal,
    #bioModal .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 85vh !important;
        padding: 25px 20px !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
    }
    
    .modal-close,
    .modal-close-team,
    .modal-close-bio {
        top: 10px !important;
        right: 10px !important;
        font-size: 32px !important;
        z-index: 1001 !important;
    }
    
    .team-modal #teamModalTitle {
        font-size: 1.8rem !important;
        word-break: break-word !important;
        padding-left: 10px !important;
        padding-right: 40px !important;
        margin-bottom: 20px !important;
    }
    
    #bioBody .bio-image {
        max-width: 150px !important;
    }
    
    #modalBody h1, 
    #bioBody h1 {
        font-size: 1.8rem !important;
    }
    
    #modalBody h2, 
    #bioBody h2 {
        font-size: 1.4rem !important;
    }
    
    #modalBody p, 
    #bioBody p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /*.service-modal,
    .team-modal {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px !important;
    }
    
    .service-modal.active,
    .team-modal.active {
        align-items: flex-start !important;
        padding-top: 20px !important;
    }*/

    .service-modal.active,
    .team-modal.active {
        /* This rule now ONLY applies when the modal is open */
        display: flex !important;
        align-items: flex-start !important;     /* From your old .active rule */
        justify-content: center !important;    /* Moved from the broken rule */
        padding-top: 20px !important;          /* From your old .active rule */
        padding-left: 10px !important;         /* Moved from the broken rule */
        padding-right: 10px !important;        /* Moved from the broken rule */
        padding-bottom: 10px !important;       /* Moved from the broken rule */
    }
    
    .team-modal .team-member-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 20px auto 0;
    }

     .header-contact-info {
        display: none;
    }
    
    /* Hide hero section on mobile */
    .hero-section {
        display: none !important;
    }
    
    /* Contact Buttons - Stack vertically on mobile */
    .contact-buttons-section {
        padding: 1rem 5% 0.5rem;
}



/* --- SMALL MOBILE (600px) --- */
@media (max-width: 600px) {
    /* Contact Buttons - Full width stack */
   .contact-buttons-container {
    flex-direction: row;       /* Force horizontal layout */
    align-items: center;
    justify-content: center;   /* Center them on the screen */
    gap: 1.5rem;              /* Space between the circles */
    max-width: 100%;
}

.contact-button {
    width: 60px !important;     /* Fixed width */
    height: 60px !important;    /* Fixed height */
    min-width: 60px !important; /* Prevent shrinking */
    padding: 0 !important;      /* Remove padding to keep it round */
    border-radius: 50% !important; /* Perfect circle */
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-buttons-container {
    flex-direction: row;       /* Force horizontal layout */
    align-items: center;
    justify-content: center;   /* Center them on the screen */
    gap: 1.5rem;              /* Space between the circles */
    max-width: 100%;
}

.contact-button {
    width: 60px !important;     /* Fixed width */
    height: 60px !important;    /* Fixed height */
    min-width: 60px !important; /* Prevent shrinking */
    padding: 0 !important;      /* Remove padding to keep it round */
    border-radius: 50% !important; /* Perfect circle */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure text is hidden on small screens */
.contact-button .contact-text {
    display: none;
}
    
    .contact-button i {
        font-size: 1.35rem;
    }
    
    .contact-button .contact-text {
        font-size: 0.9rem;
    }
    
    /* Header & Navigation */
    header { 
        flex-direction: row; 
        justify-content: flex-start;
        align-items: center; 
        height: var(--header-height);
        padding: 0 5%; 
    }
    
    .hamburger {
        display: block; 
        order: 1;
    }
    
    .logo {
        order: 2;
        margin-left: 1rem;
        flex: none; 
    }
    
    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: none; 
        position: fixed;
        top: var(--header-height); 
        left: 0;
        width: 100%;
        height: 100vh; 
        background-color: var(--mobile-menu-bg);
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        z-index: 99;
        transition: transform 0.3s ease-in-out;
        transform: translateY(-100vh); 
    }
    
    .mobile-nav.is-open {
        transform: translateY(0);
        display: flex; 
    }

    .mobile-nav a {
        color: white;
        text-decoration: none;
        font-size: 1.5rem;
        padding: 15px 0;
        width: 80%;
        text-align: center;
        margin: 0; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-nav a:last-child {
        border-bottom: none;
        margin-top: 15px;
    }
    
    .cta-nav {
        margin-top: 1rem;
    }
    
    .hero-section {
        padding: 10% 3%;
    }
    
    body {
        padding-top: var(--header-height); 
    }

    .header-contact-info {
        display: none;
    }
}

/* ============================================
   14. UTILITY CLASSES & OVERRIDES
   ============================================ */
section { 
    padding: 4rem 5%; 
}

.section-inner {
    background: rgba(255,255,255,0.92);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* Fallback for older browsers */
@supports not (max-height: min(65vh, 720px)) {
    .carousel-container {
        max-height: 65vh;
    }
}

/* ===========================================
    15. Emergency Notification Section
    ==========================================*/
.notification-section {
    padding: 1.5rem 5%;
    background: transparent;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    border-left: 6px solid var(--primary-color);
}

.notification-container.alert {
    border-left-color: #e74c3c;
}

.notification-container.warning {
    border-left-color: #f39c12;
}

.notification-container.info {
    border-left-color: var(--primary-color);
}

.notification-container.success {
    border-left-color: var(--bright-green);
}

.notification-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.notification-container.alert .notification-icon {
    background: #e74c3c;
}

.notification-container.warning .notification-icon {
    background: #f39c12;
}

.notification-container.success .notification-icon {
    background: var(--bright-green);
}

.notification-icon i {
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
}

.notification-message {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.notification-message p {
    margin: 0;
    padding: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {


    .notification-section {
        padding: 1rem 3%;
    }
    
    .notification-container {
        padding: 1.25rem 1rem;
        gap: 1rem;
    }
    
    .notification-icon {
        width: 40px;
        height: 40px;
    }
    
    .notification-icon i {
        font-size: 1.2rem;
    }
    
    .notification-title {
        font-size: 1.1rem;
    }
    
    .notification-message {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .notification-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   PATIENT INFORMATION MODAL - Replace existing patient modal CSS
   ============================================ */
.patient-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    justify-content: center;
    align-items: center;
}

.patient-modal.active {
    display: flex;
    opacity: 1;
}

.patient-modal.closing {
    opacity: 0;
}

.patient-modal .patient-modal-content {
    position: relative;
    background-color: #fefefe;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

.patient-modal .modal-close-patient {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10001;
}

.patient-modal .modal-close-patient:hover {
    color: #333;
}

/* CRITICAL: Match service modal heading styles exactly */
.patient-modal #patientModalBody h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--logo-color); /* #F2994A - Orange like service modal */
    border-bottom: 2px solid var(--text-dark); /* #FFE599 */
    padding-bottom: 5px;
    text-align: left;
}

.patient-modal #patientModalBody h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark); /* #2D9CDB - Blue like service modal */
    text-transform: uppercase;
}

.patient-modal #patientModalBody h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark) !important; /* #2D9CDB - Blue like service modal */
}

.patient-modal #patientModalBody p {
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.6;
}

.patient-modal #patientModalBody ul,
.patient-modal #patientModalBody ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: #555;
}

.patient-modal #patientModalBody li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #555;
}

/* Links as Buttons - Match service modal style */
.patient-modal #patientModalBody a {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 5px;
    background-color: var(--primary-color); /* #2D9CDB */
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(45, 156, 219, 0.3);
}

.patient-modal #patientModalBody a:hover {
    background-color: var(--secondary-color); /* #F2994A */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 153, 74, 0.4);
}

.patient-modal #patientModalBody strong,
.patient-modal #patientModalBody b {
    font-weight: 700;
    color: #333;
}

/* Quill alignment classes */
.patient-modal #patientModalBody .ql-align-center {
    text-align: center;
}

.patient-modal #patientModalBody .ql-align-right {
    text-align: right;
}

.patient-modal #patientModalBody .ql-align-justify {
    text-align: justify;
}

/* Center links inside centered paragraphs */
.patient-modal #patientModalBody p.ql-align-center a {
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: fit-content;
}

.patient-modal #patientModalBody .loading-message {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #666;
}

/* Mobile styles */
@media (max-width: 768px) {
    .patient-modal .patient-modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 85vh;
        padding: 25px 20px;
        margin: 20px auto;
    }
    
    .patient-modal .modal-close-patient {
        top: 10px;
        right: 10px;
        font-size: 32px;
    }
    
    .patient-modal #patientModalBody h1 {
        font-size: 1.8rem;
        padding-right: 30px;
    }
    
    .patient-modal #patientModalBody h2 {
        font-size: 1.4rem;
    }
    
    .patient-modal #patientModalBody h3 {
        font-size: 1.2rem;
    }
    
    .patient-modal.active {
        align-items: flex-start;
        padding-top: 20px;
    }
}