/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #1e3a8a; /* Deep Blue */
    --primary-light: #3b82f6; 
    --secondary-color: #e0f2fe; /* Soft Blue */
    --accent-color: #0d9488; /* Teal */
    --accent-hover: #0f766e;
    --text-main: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --font-family: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header p {
    font-size: 1.125rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
}

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

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.7)), url('https://images.unsplash.com/photo-1579684385127-1ef15d508118?q=80&w=2000&auto=format&fit=crop') no-repeat center center/cover;
    color: var(--white);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 650px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

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

.hero p {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-img {
    position: relative;
    height: 200px;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-icon {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--white);
}

.service-content {
    padding: 2rem 1.5rem 1.5rem;
}

.service-content p {
    margin-bottom: 0;
}

/* ==========================================================================
   Doctors Section
   ========================================================================== */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.doctor-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.doctor-img {
    height: 300px;
    overflow: hidden;
}

.doctor-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: var(--transition);
}

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

.doctor-info {
    padding: 1.5rem;
}

.doctor-info h3 {
    margin-bottom: 0.25rem;
}

.specialty {
    display: block;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.experience, .availability {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.doctor-socials {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

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

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

/* ==========================================================================
   Appointment Section
   ========================================================================== */
.appointment {
    background-color: var(--primary-color);
    color: var(--white);
    position: relative;
}

.appointment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
}

.appointment-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.appointment-info h2 {
    color: var(--white);
}

.appointment-info p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-list i {
    color: var(--accent-color);
    font-size: 1.25rem;
}

.appointment-form-container {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f9fafb;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: var(--white);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    background-color: #dcfce7;
    color: #166534;
    text-align: center;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.form-message.hidden {
    opacity: 0;
    visibility: hidden;
    display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #0f172a;
    color: #cbd5e1;
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    color: var(--white);
    margin-bottom: 1rem;
    display: inline-flex;
}

.footer-about p {
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
}

.footer h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-contact ul li, .footer-hours ul li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-contact i {
    color: var(--accent-color);
    margin-top: 0.25rem;
}

.footer-hours ul li {
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.footer-hours ul li:last-child {
    border-bottom: none;
}

.footer-hours .emergency {
    color: #ef4444;
    font-weight: 600;
    margin-top: 1rem;
    justify-content: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .appointment-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease-in-out;
    }

    .nav-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1.5rem;
    }

    .nav-menu .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    .hero {
        padding: 6rem 0 4rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 3rem 0;
    }
}
