:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --emergency: #ef4444;
    --emergency-dark: #dc2626;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Typography & Layout */
h1, h2, h3 { line-height: 1.2; font-weight: 700; color: var(--text-main); }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 2rem; }
a { text-decoration: none; color: inherit; }
.w-100 { width: 100%; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
}
.btn-primary { background-color: var(--primary); color: var(--white); }
.btn-primary:hover { background-color: var(--primary-dark); transform: translateY(-1px); }
.btn-emergency { background-color: var(--emergency); color: var(--white); }
.btn-emergency:hover { background-color: var(--emergency-dark); transform: translateY(-1px); }
.btn-outline { background-color: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: var(--white); }
.btn-large { padding: 1rem 2rem; font-size: 1.1rem; }

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
nav ul { display: flex; gap: 2rem; list-style: none; }
nav a { font-weight: 500; color: var(--text-main); transition: color 0.2s; }
nav a:hover { color: var(--primary); }
.header-actions { display: flex; gap: 1rem; }
.admin-link { color: var(--text-muted); font-size: 0.9rem; }

/* Hero Section */
.hero {
    position: relative;
    background: url('https://images.unsplash.com/photo-1606811841689-23dfddce3e95?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    padding: 8rem 5%;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1.5rem; color: var(--white); }
.hero p { font-size: 1.25rem; color: #e2e8f0; max-width: 600px; margin: 0 auto 2.5rem; }

/* Services */
.services, .doctors-section { padding: 5rem 5%; }
.service-cards, .doctor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: 1rem; color: var(--primary); }

/* Doctors */
.doc-card { text-align: center; }
.doc-avatar-img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 3px solid var(--primary); }
.doc-card p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Before / After Slider */
.transformation-section {
    padding: 5rem 5%;
    background: var(--white);
    text-align: center;
}
.slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 2rem auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    container-type: inline-size;
}
.img-after, .img-before {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.img-before {
    width: 50%;
    overflow: hidden;
    z-index: 2;
}
.img-after img, .img-before img {
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-after img {
    width: 100%;
}
.img-before img {
    width: 100cqw;
    max-width: none;
}
.slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0; cursor: ew-resize;
    z-index: 4;
}
.slider-button {
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 4px;
    background: var(--white);
    z-index: 3;
    pointer-events: none;
}
.slider-button::after {
    content: '< >';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    color: var(--primary);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 14px;
    box-shadow: var(--shadow);
}

/* Estimator */
.estimator-section { padding: 5rem 5%; background: var(--bg-light); }
.estimator-card {
    background: var(--white);
    max-width: 600px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.form-group select, .form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.estimate-results { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.estimate-results p { font-size: 1.1rem; display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.out-of-pocket { font-size: 1.5rem; color: var(--primary); margin-top: 1rem; display: flex; justify-content: space-between; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
}
.modal.active { display: flex; animation: fadeIn 0.3s ease; }
.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    width: 90%; max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}
.emergency-content { border-top: 6px solid var(--emergency); }
.emergency-title { color: var(--emergency); }
.close {
    position: absolute;
    top: 1rem; right: 1.5rem;
    font-size: 1.5rem; font-weight: bold;
    color: var(--text-muted); cursor: pointer;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Admin Base */
.admin-header {
    background: var(--text-main);
    color: var(--white);
}
.admin-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 70px);
}
.sidebar {
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
}
.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 1rem; cursor: pointer; padding: 0.75rem; border-radius: 8px; transition: background 0.2s;}
.sidebar li:hover, .sidebar li.active { background: var(--bg-light); font-weight: 600; color: var(--primary); }
.admin-main { padding: 2rem; }
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}
.status-Scheduled { background: #dbeafe; color: #1e40af; }
.status-In-Chair { background: #fef3c7; color: #b45309; }
.status-Completed { background: #d1fae5; color: #065f46; }

table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-light); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* Stats Strip */
.stats-strip {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--primary);
    color: var(--white);
    padding: 3rem 5%;
    flex-wrap: wrap;
    gap: 2rem;
}
.stat-item {
    text-align: center;
}
.stat-item h3 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}
.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Reviews Section */
.reviews-section {
    padding: 5rem 5%;
    background: var(--bg-light);
}
.review-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.review-card {
    text-align: center;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.review-card .stars {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.review-text {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-main);
}
.review-author {
    font-weight: 600;
    color: var(--primary);
}

/* Footer */
.main-footer {
    background: var(--text-main);
    color: var(--white);
    padding: 4rem 5% 2rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}
.footer-info {
    flex: 1;
    min-width: 250px;
}
.footer-info h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}
.footer-info p {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}
.footer-map {
    flex: 1;
    min-width: 300px;
    height: 200px;
    background: #334155;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}
