@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

:root {
    --primary: #c2185b; /* Deep Pink */
    --primary-light: #f8bbd0; /* Light Pink accent */
    --primary-dark: #880e4f; /* Dark Pink for text and emphasis */
    --bg-light: #fff5f7; /* Soft pink-white background */
    --white: #ffffff;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --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);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    -webkit-tap-highlight-color: transparent;
}

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

ul {
    list-style: none;
}

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

input, select, textarea {
    font-family: 'Tajawal', sans-serif;
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--bg-light);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

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

.logo i {
    font-size: 1.8rem;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

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

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

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(194, 24, 91, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(194, 24, 91, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, var(--bg-light) 100%);
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-wrapper img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 5px solid var(--white);
}

/* Features & Services Section */
.section {
    padding: 5rem 2rem;
}

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

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

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: var(--transition);
}

.card:hover::before {
    transform: scaleX(1);
}

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

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

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

/* Contact Info & Map Details */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.contact-item-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-item h4 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-muted);
}

/* Form Styles */
.booking-form-wrapper {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: #fafafa;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(194, 24, 91, 0.1);
}

/* Admin Grid Layout (Responsive Dashboard Layouts) */
.admin-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 992px) {
    .admin-grid-layout {
        grid-template-columns: 1fr 2fr;
    }
}

/* Admin Dashboard Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-light);
}

.sidebar {
    width: 280px;
    background-color: var(--white);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: var(--shadow-sm);
    z-index: 900;
}

.sidebar-toggle-btn,
.sidebar-close-btn,
.sidebar-overlay {
    display: none;
}

.sidebar-brand {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

.sidebar-menu {
    padding: 1.5rem 1rem;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--primary);
    color: var(--white);
}

.sidebar-menu a i {
    font-size: 1.2rem;
    width: 24px;
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-x: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background-color: var(--white);
    padding: 1.25rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.admin-header-title h2 {
    font-size: 1.6rem;
    color: var(--primary-dark);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Table Style */
.table-wrapper {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow-x: auto;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th, td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: #fafafa;
    font-weight: 600;
    color: var(--primary-dark);
}

tr:hover {
    background-color: #fafafa;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background-color: #e6fffa;
    color: #319795;
}

.badge-warning {
    background-color: #feebc8;
    color: #dd6b20;
}

.badge-danger {
    background-color: #fed7d7;
    color: #e53e3e;
}

/* Modal and forms in Dashboard */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #e6fffa;
    color: #319795;
    border: 1px solid #b2f5ea;
}

.alert-danger {
    background-color: #fed7d7;
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .admin-container {
        flex-direction: column;
    }
    .sidebar {
        position: fixed !important;
        right: 0;
        top: 0;
        height: 100vh !important;
        width: 280px !important;
        z-index: 10000;
        background-color: var(--white);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        display: flex;
        flex-direction: column;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .sidebar-toggle-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: var(--radius-md);
        background-color: var(--bg-light);
        color: var(--primary);
        border: 1px solid var(--border);
        cursor: pointer;
        font-size: 1.25rem;
        transition: var(--transition);
    }
    .sidebar-toggle-btn:hover {
        background-color: var(--primary-light);
        color: var(--primary-dark);
    }
    .sidebar-close-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: var(--radius-md);
        color: var(--text-muted);
        background: none;
        border: none;
        cursor: pointer;
        font-size: 1.25rem;
        transition: var(--transition);
        margin-inline-start: auto;
    }
    .sidebar-close-btn:hover {
        background-color: var(--bg-light);
        color: var(--danger);
    }
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    .sidebar-menu {
        flex-direction: column !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        white-space: normal !important;
        flex-grow: 1;
        padding: 1rem !important;
        gap: 0.25rem !important;
    }
    .menu-category {
        padding: 0.75rem 0.5rem 0.25rem 0.5rem;
    }
    .sidebar-menu a {
        margin-bottom: 0;
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        flex-shrink: 0;
    }
    .main-content {
        padding: 1rem;
    }
    .admin-header {
        padding: 1rem;
        margin-bottom: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-toggle {
        display: block;
    }
    .booking-form-wrapper {
        padding: 1.5rem;
    }
}

/* Premium Animations & Motion Design */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatArt {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.hero-content {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-image-wrapper {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards, floatArt 6s ease-in-out infinite;
}

.grid-3 .card {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Delay grid cards slightly for a staggered entrance */
.grid-3 .card:nth-child(1) { animation-delay: 0.1s; }
.grid-3 .card:nth-child(2) { animation-delay: 0.2s; }
.grid-3 .card:nth-child(3) { animation-delay: 0.3s; }
.grid-3 .card:nth-child(4) { animation-delay: 0.4s; }
.grid-3 .card:nth-child(5) { animation-delay: 0.5s; }
.grid-3 .card:nth-child(6) { animation-delay: 0.6s; }

.card {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(194, 24, 91, 0.12);
    border-color: var(--primary-light);
}

.card-icon {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .card-icon {
    transform: scale(1.15) rotate(5deg);
}

.btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.btn:hover {
    box-shadow: 0 4px 12px rgba(194, 24, 91, 0.2);
}

.btn:active {
    transform: scale(0.97);
}

/* Sidebar Menu Category Headings */
.menu-category {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 800;
    padding: 0.8rem 1rem 0.3rem 1rem;
    margin-top: 0.8rem;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 0.3rem;
}

/* Animated Floating Tooth Graphic */
.animated-tooth {
    animation: toothFloat 5s ease-in-out infinite alternate;
}
.animated-logo {
    animation: logoPulse 4s ease-in-out infinite alternate;
}
@keyframes toothFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes logoPulse {
    0% { transform: scale(0.97); }
    100% { transform: scale(1.03); }
}

/* Global Printing Optimizations */
@media print {
    body {
        background-color: white !important;
        color: black !important;
        font-size: 11pt !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Hide all layout elements and non-printable details */
    .sidebar, 
    .admin-header, 
    .no-print, 
    .btn, 
    .sidebar-overlay, 
    form, 
    button, 
    input, 
    select, 
    textarea,
    .sidebar-toggle-btn,
    .sidebar-close-btn {
        display: none !important;
    }
    /* Force main workspace to occupy full printing dimensions */
    .admin-container {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        box-shadow: none !important;
        background: transparent !important;
    }
    .table-wrapper {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Improve table borders visibility on printer */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        border: 1px solid #1a202c !important;
    }
    th, td {
        border: 1px solid #cbd5e0 !important;
        padding: 8px !important;
        color: black !important;
    }
}
