/* 
   Dental Clinic Website - Global Styles
   Premium, Clean, Trustworthy
*/

:root {
    /* Brand Colors - Black, Grey, Gold Theme */
    --bg-color: #FFFFFF;
    --primary-color: #1A1A1A;
    /* Near Black */
    --secondary-color: #333333;
    /* Dark Grey */
    --accent-color: #C5A059;
    /* Gold */
    --text-color: #111111;
    --text-light: #555555;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --error: #D32F2F;
    --success: #388E3C;
    --border-color: #EAEAEA;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;
    --container-width: 1200px;
    --header-height: 80px;

    /* UI Elements */
    --radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.mt-1 {
    margin-top: var(--spacing-md);
}

.mt-2 {
    margin-top: var(--spacing-lg);
}

.mt-3 {
    margin-top: var(--spacing-xl);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    min-height: 48px;
    /* Large tap target */
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: #3A6360;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Header & Nav */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(249, 249, 247, 0.95);
    backdrop-filter: blur(10px);
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    background-color: #EAEAE8;
    /* Fallback */
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    /* Slight fade for text readability */
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(249, 249, 247, 0.9) 0%, rgba(249, 249, 247, 0.6) 50%, rgba(249, 249, 247, 0.1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
}

/* Sections Global */
section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: var(--spacing-xs);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md);
}

/* Services Grid - Premium Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.service-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.service-card-content {
    padding: 30px;
}

.service-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-color);
    /* Gold Number */
    opacity: 0.3;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card-image {
        height: 250px;
    }
}

/* Highlights Section - Premium Overhaul */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.highlight-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    /* Flex to align content */
    flex-direction: column;
    align-items: center;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.highlight-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
}

.highlight-card h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.highlight-card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .highlights-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Cards */
.card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Icon Box */
.icon-box {
    text-align: center;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #E8F0EF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    color: var(--primary-color);
    font-size: 2rem;
}

/* Doctor Spotlight */
.doctor-spotlight {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.doctor-spotlight-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.doctor-spotlight-content h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.doctor-qualifications {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: inline-block;
    letter-spacing: 1px;
}

.doctor-bio {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.doctor-highlights {
    background-color: var(--off-white);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid var(--accent-color);
}

.doctor-highlights h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.doctor-highlights p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .doctor-spotlight {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .doctor-spotlight-img {
        height: 350px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .doctor-highlights {
        text-align: left;
    }
}

/* Footer */
footer {
    background-color: #2C2C2C;
    color: #DDD;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 4px;
}

.copyright {
    border-top: 1px solid #444;
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* Sticky Mobile Nav Button on bottom right (for older users?) 
   Or just keep it standard. Let's stick to standard top nav for now. */

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --spacing-xl: 40px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .nav-links {
        display: none;
        /* Hide for now, enable JS toggle later */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-md);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Mobile Styles Fixed */
    .hero-buttons {
        flex-direction: column;
    }

    /* Contact page: stack form and info vertically */
    .contact-section .grid-3 {
        grid-template-columns: 1fr !important;
    }

    /* Footer: stack columns on mobile */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-lg);
        text-align: center;
    }

    /* Testimonials: single column on small screens */
    .testimonials .grid-3 {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .page-header h1 {
        font-size: 2rem !important;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Detailed Feature Sections */
.detail-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-row:nth-child(even) {
    flex-direction: row-reverse;
}

.detail-content {
    flex: 1;
}

.detail-content h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.detail-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
}

.detail-image {
    flex: 1;
}

.detail-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 900px) {
    .detail-row {
        flex-direction: column !important;
        /* Force stack on mobile */
        gap: 30px;
        margin-bottom: 60px;
    }

    .detail-content h2 {
        font-size: 1.8rem;
    }
}

/* About Page Doctor Grid */
.doctor-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.doctor-card-horizontal {
    display: flex;
    background: var(--white);
    border-radius: 20px;
    /* Match spotlight */
    padding: 25px;
    /* Framed look */
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    align-items: center;
    /* Vertically center */
    gap: 25px;
    /* Space between image and text */
    height: 100%;
    transition: var(--transition);
}

.doctor-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.doctor-card-horizontal img {
    width: 160px;
    /* Fixed width */
    height: 190px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.doctor-card-content {
    padding: 0;
    flex: 1;
}

.doctor-card-content h3 {
    margin-bottom: 5px;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.doctor-card-content .qualifications {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doctor-card-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .doctor-grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .doctor-card-horizontal {
        flex-direction: row;
        padding: 20px;
        align-items: flex-start;
    }

    .doctor-card-horizontal img {
        width: 100px;
        height: 120px;
    }

    .doctor-card-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .doctor-card-horizontal {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .doctor-card-horizontal img {
        width: 100%;
        height: 250px;
        margin-bottom: 15px;
    }
}

/* ============================
   UI/UX ENHANCEMENTS
   ============================ */

/* Scroll-triggered fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered animation delays for grid children */
.stagger-children>*:nth-child(1) {
    transition-delay: 0s;
}

.stagger-children>*:nth-child(2) {
    transition-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
    transition-delay: 0.2s;
}

.stagger-children>*:nth-child(4) {
    transition-delay: 0.25s;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6);
    }

    100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
}

/* Enhanced Form Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Gradient section divider */
.section-divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border: none;
    margin: 0;
}

/* Testimonial Card Enhancements */
.testimonials .card {
    position: relative;
    border-left: 3px solid var(--accent-color);
    transition: all 0.4s ease;
}

.testimonials .card::before {
    content: '\201C';
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.15;
    position: absolute;
    top: 10px;
    left: 15px;
    line-height: 1;
}

.testimonials .card:hover {
    border-left-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Service Card Image Zoom on Hover */
.service-card:hover .service-card-image {
    transform: scale(1.05);
}

.service-card-image {
    transition: transform 0.5s ease;
}

.service-card {
    overflow: hidden;
}

/* Highlight card icon bounce on hover */
.highlight-card:hover .highlight-image {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Footer link underline animation */
.footer-links a {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* CTA section subtle glow */
.cta {
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(197, 160, 89, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* Doctor spotlight image subtle border */
.doctor-spotlight-img {
    border: 3px solid transparent;
    transition: border-color 0.4s ease;
}

.doctor-spotlight:hover .doctor-spotlight-img {
    border-color: var(--accent-color);
}

/* Hero section text shadow for readability */
.hero-title {
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.4);
}

/* Google review badge styling */
.testimonials .section-header::after {
    content: '★ From Google Reviews';
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Button press effect */
.btn:active {
    transform: scale(0.97);
}

/* Smooth page load */
body {
    animation: pageLoad 0.5s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Phone number tap highlight on mobile */
a[href^="tel:"] {
    white-space: nowrap;
}

/* Contact section form card hover */
.contact-section>.container>.grid-3>div:first-child {
    transition: box-shadow 0.3s ease;
}

.contact-section>.container>.grid-3>div:first-child:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Selection color */
::selection {
    background-color: var(--accent-color);
    color: white;
}

/* Scrollbar styling (webkit browsers) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b08942;
}