/* 
===============================================
Endoclinica - Primary Stylesheet
Aesthetics: Premium, Modern, Blue & Teal Theme
Keywords: vibrant, responsive, glassmorphism, medical
===============================================
*/

:root {
    /* Color Palette */
    --primary-color: #02273f; /* Deep Navy Space */
    --secondary-color: #5d86b9; /* Steel Blue */
    --accent-color: #640e0e; /* Burgundy Red */
    
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    
    --bg-main: #f8fafc;
    --bg-light: #f1f5f9;
    --white: #ffffff;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Variables */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

/* ================== RESET ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(0, 172, 193, 0.1);
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 40px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(13, 71, 161, 0.1);
}

/* ================== BUTTONS ================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 172, 193, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 172, 193, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ================== NAVBAR ================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    transition: var(--transition);
    z-index: 1000;
    padding: 20px 0;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
}

.navbar.scrolled .logo,
.navbar.scrolled .logo span {
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
}

.navbar.scrolled .nav-links a {
    color: var(--text-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.navbar.scrolled .nav-links a:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
}

.navbar.scrolled .mobile-menu-btn {
    color: var(--primary-color);
}

/* ================== MOBILE NAV ================== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--white);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 50px 30px;
}

.mobile-nav.open {
    right: 0;
}

.close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-dark);
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 40px;
}

.mobile-nav-links a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
}

.mobile-nav-links a:hover {
    color: var(--secondary-color);
    padding-left: 10px;
}

/* ================== HERO ================== */
.hero {
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(13, 71, 161, 0.9) 0%, rgba(0, 172, 193, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: var(--white);
    padding-top: 80px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* ================== ABOUT ================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.image-wrapper {
    position: relative;
    padding: 15px;
}

.clinic-interior-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, var(--bg-light), #e2e8f0);
    border-radius: calc(var(--border-radius) - 5px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("assets/images/hero_clinic_1774912185524.png");
    background-size: cover;
    background-position: center;
}

.clinic-icon {
    font-size: 4rem;
    color: rgba(255,255,255,0.8);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}

/* ================== SERVICES ================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* Services Carousel */
.carousel-container {
    display: flex;
    align-items: center;
    position: relative;
    gap: 15px;
}

.carousel-track-wrapper {
    overflow: hidden;
    width: 100%;
    scroll-behavior: smooth; /* optional for mouse wheel/touch */
}

/* Overflow touch configuration for mobile native feel */
@media (max-width: 768px) {
    .carousel-track-wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 15px; /* for scrollbar */
    }
    .carousel-track-wrapper::-webkit-scrollbar {
        height: 6px;
    }
    .carousel-track-wrapper::-webkit-scrollbar-thumb {
        background-color: var(--secondary-color);
        border-radius: 10px;
    }
}

.services-track {
    display: flex;
    gap: 30px;
    transition: transform 0.4s ease-out;
}

.carousel-btn {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid rgba(0,0,0,0.05);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    flex-shrink: 0;
    z-index: 2;
}

.carousel-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.carousel-btn:disabled,
.carousel-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none; /* Hide standard buttons on mobile in favor of swipe */
    }
}

.service-card {
    text-align: center;
    padding: 40px 30px;
}

.services-track .service-card {
    flex: 0 0 auto;
    width: calc(33.333% - 20px); /* Desktop default: 3 items (adjusting for gap) */
}

@media (max-width: 992px) {
    .services-track .service-card {
        width: calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .services-track .service-card {
        width: 80%; /* Takes up 80% of screen to hint there is more next to it */
        scroll-snap-align: center;
    }
}

.icon-box {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.1), rgba(0, 172, 193, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-box i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card:hover .icon-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.service-card:hover .icon-box i {
    color: var(--white);
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ================== DOCTORS ================== */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.doctor-card {
    padding: 20px;
    text-align: center;
}

.doctor-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.doctor-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s ease;
}

.doctor-card:hover .doctor-img {
    transform: scale(1.05);
}

.doctor-name {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.doctor-specialty {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.doctor-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.doctor-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.doctor-socials a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.doctor-socials a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* ================== BANNER CTA ================== */
.banner-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 80px 0;
    color: var(--white);
}

.banner-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.banner-text {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.banner-cta .btn {
    background-color: var(--white);
    color: var(--primary-color);
}

.banner-cta .btn:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* ================== CONTACT ================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 172, 193, 0.1);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.info-text p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.contact-form h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.2);
}

/* ================== FOOTER ================== */
.footer {
    background-color: #0b1120;
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-about p {
    color: #94a3b8;
    margin-bottom: 25px;
    max-width: 400px;
}

.footer-links h3,
.footer-services h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-services h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer ul a {
    color: #94a3b8;
    position: relative;
    padding-left: 15px;
}

.footer ul a::before {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.footer ul a:hover {
    color: var(--white);
    padding-left: 20px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    color: #64748b;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

/* ================== ANIMATIONS ================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================== RESPONSIVE ================== */
@media (max-width: 992px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-btn {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
