/* ========================================
   DaanBook System - Complete Responsive Stylesheet
   Mobile-First Responsive Design
   Supports: Mobile, Tablet, Desktop, Large Screens
   ======================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Theme: DaanBook Red & Yellow */
    --saffron: #DC2626;
    /* Primary Red */
    --saffron-dark: #B91C1C;
    /* Darker Red */
    --gold: #F59E0B;
    /* Primary Yellow */
    --gold-light: #FEF3C7;
    /* Light Yellow bg */
    --blue-accent: #3B82F6;
    /* 5% Blue Accent */

    /* Mappings */
    --primary: var(--saffron);
    --secondary: var(--gold);

    /* Legacy mappings (if any) */
    --green: var(--blue-accent);
    /* Replacing green with blue for now or keep separate */
    --green-dark: #1E40AF;

    --white: #ffffff;
    --light-gray: #f8fafc;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-3d: 4px 4px 0px rgba(220, 38, 38, 0.2);
    /* Red shadow */
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans', 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-gray);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==================== HEADER & NAVIGATION ==================== */
.site-header {
    background: linear-gradient(135deg, var(--saffron) 0%, var(--green) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    white-space: nowrap;
    display: block;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ==================== HERO SECTION ==================== */
.hero {
    background: linear-gradient(135deg, var(--saffron) 0%, var(--green) 100%);
    color: var(--white);
    padding: clamp(3rem, 10vw, 6rem) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s;
    position: relative;
    z-index: 1;
}

.hero .lead {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeIn 1.5s;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2.5rem);
    border: none;
    border-radius: 50px;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: var(--shadow-3d);
    position: relative;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-3px);
    box-shadow: 6px 6px 0px rgba(19, 136, 8, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--saffron);
}

.btn-secondary:hover {
    background: var(--light-gray);
    transform: translateY(-3px);
    box-shadow: 6px 6px 0px rgba(255, 153, 51, 0.4);
}

.btn-success {
    background: var(--green);
    color: var(--white);
}

.btn-danger {
    background: #ef4444;
    color: var(--white);
}

.btn-small,
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large,
.btn-lg {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

/* ==================== CARDS & GRIDS ==================== */
.card-3d {
    background: var(--white);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border: 3px solid transparent;
}

.card-3d:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

.feature-grid,
.services-grid,
.stats-grid,
.testimonial-grid,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    margin: 3rem 0;
}

.feature-card,
.service-card,
.stat-card,
.testimonial-card,
.blog-card {
    background: var(--white);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border-left: 5px solid var(--saffron);
}

.feature-card:hover,
.service-card:hover,
.stat-card:hover,
.testimonial-card:hover,
.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--green);
}

.feature-card h3,
.service-card h3 {
    color: var(--saffron);
    margin: 1rem 0;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.feature-card .icon,
.service-card .icon {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

/* ==================== STATS SECTION ==================== */
.stats-section {
    background: linear-gradient(135deg, var(--saffron) 0%, var(--green) 100%);
    color: var(--white);
    padding: clamp(2rem, 6vw, 4rem) 0;
    margin: 4rem 0;
}

.stat-number {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: bold;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==================== FORMS ==================== */
.form-section {
    background: var(--white);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.form-section h2 {
    color: var(--saffron);
    margin-bottom: 1.5rem;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: clamp(0.8rem, 2vw, 1rem);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--saffron);
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-gray);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ==================== ALERTS & BADGES ==================== */
.alert {
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 5px solid;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: var(--green);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left-color: #3b82f6;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.badge-success {
    background: #def7ec;
    color: #03543f;
    border: 1px solid #84e1bc;
}

.badge-warning {
    background: #fdf6b2;
    color: #723b13;
    border: 1px solid #fce96a;
}

.badge-danger {
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

.badge-info {
    background: #e1effe;
    color: #1e429f;
    border: 1px solid #a4cafe;
}

.badge-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

/* ==================== ADMIN PANEL ==================== */
.admin-body {
    background: #f1f5f9;
    margin: 0;
    padding: 0;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.admin-content-wrapper {
    flex: 1;
    margin-left: 250px;
    padding: 0;
    min-height: 100vh;
}

.admin-main {
    background: var(--white);
    padding: 2rem;
    margin: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    max-width: calc(100% - 4rem);
}

.admin-nav ul {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 0.5rem;
}

.admin-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.admin-nav a:hover {
    background: var(--saffron);
    color: var(--white);
    transform: translateX(5px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--saffron);
}

/* ==================== TABLES ==================== */
.admin-table,
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
}

.admin-table thead,
.table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-dark);
}

.admin-table th,
.table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4a5568;
    border-bottom: 2px solid #edf2f7;
}

.admin-table td,
.table td {
    padding: 1rem;
    text-align: left;
    font-size: 0.95rem;
    color: #2d3748;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    transition: background 0.2s;
}

.admin-table tbody tr:last-child td,
.table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover td,
.table tbody tr:hover td {
    background: #fdfaf3;
}

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==================== BLOG PAGES ==================== */
.blog-listing-page,
.blog-detail-page {
    padding: 2rem 0;
}

.blog-card {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    margin-bottom: 1rem;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--saffron);
    color: var(--white);
    border-radius: 12px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.blog-content h2 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin: 0.5rem 0;
}

.blog-content h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-content h2 a:hover {
    color: var(--saffron);
}

.blog-excerpt {
    color: var(--text-gray);
    margin: 1rem 0;
    flex: 1;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin: 1rem 0;
}

.blog-header {
    margin-bottom: 2rem;
}

.blog-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 16px;
    margin: 2rem 0;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-body {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.8;
    color: var(--text-dark);
}

.blog-body h2,
.blog-body h3,
.blog-body h4 {
    margin: 2rem 0 1rem;
    color: var(--saffron);
}

.blog-body p {
    margin-bottom: 1.5rem;
}

.blog-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.blog-tags {
    margin: 2rem 0;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    color: var(--text-dark);
    border-radius: 20px;
    margin: 0.25rem;
    font-size: 0.875rem;
}

/* ==================== DASHBOARD ==================== */
.dashboard-page {
    padding: 2rem 0;
}

.dashboard-info ul {
    list-style: none;
    padding: 1rem 0;
}

.dashboard-info li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.dashboard-actions {
    margin: 2rem 0;
    text-align: center;
}

.dashboard-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ==================== FOOTER ==================== */
.site-footer {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--green-dark) 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.footer-col a:hover {
    opacity: 1;
    color: var(--gold);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

/* ==================== WHATSAPP FLOAT ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    width: clamp(50px, 10vw, 60px);
    height: clamp(50px, 10vw, 60px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== SECTION HEADINGS ==================== */
section h2 {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--saffron);
    margin: 3rem 0 2rem;
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(60px, 15vw, 100px);
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--saffron) 100%);
    border-radius: 2px;
}

/* ==================== UTILITY CLASSES ==================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 1rem;
}

.p-2 {
    padding: 2rem;
}

.p-3 {
    padding: 3rem;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */

/* Tablets and Small Laptops (768px - 1024px) */
@media (max-width: 1024px) {
    .admin-container {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }

    .admin-sidebar {
        padding: 1rem;
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 768px) {

    /* Navigation */
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        text-align: center;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        width: 100%;
    }

    /* Hero */
    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .lead {
        font-size: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    /* Grids */
    .feature-grid,
    .services-grid,
    .stats-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    /* Admin Panel */
    .admin-container {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        margin-bottom: 1rem;
    }

    .admin-nav ul {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    /* Tables */
    .admin-table,
    .dashboard-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td,
    .dashboard-table th,
    .dashboard-table td {
        padding: 0.5rem;
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Form Actions */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Mobile Phones (up to 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .card-3d,
    .feature-card,
    .service-card,
    .stat-card {
        padding: 1.5rem;
    }

    .form-section {
        padding: 1.5rem;
    }

    .admin-main {
        padding: 1.5rem;
    }

    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    /* Stack table cells vertically on very small screens */
    .admin-table,
    .dashboard-table {
        display: block;
        overflow-x: auto;
    }
}

/* Large Screens (1440px and above) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .admin-container {
        grid-template-columns: 280px 1fr;
    }
}

/* Print Styles */
@media print {

    .site-header,
    .site-footer,
    .whatsapp-float,
    .admin-sidebar,
    .btn,
    .cta-buttons {
        display: none;
    }

    body {
        background: white;
    }

    .admin-container {
        grid-template-columns: 1fr;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --light-gray: #1e293b;
        --white: #0f172a;
        --text-dark: #f1f5f9;
        --text-gray: #cbd5e1;
    }
    */
}

/* ==================== MOBILE RESPONSIVE ENHANCEMENTS ==================== */

/* Mobile Menu Styles */
@media (max-width: 768px) {

    /* Show hamburger menu on mobile */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Hide default menu, show as slide-in */
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        max-width: 80% !important;
        height: 100vh !important;
        background: linear-gradient(135deg, var(--saffron) 0%, var(--green) 100%) !important;
        flex-direction: column !important;
        padding: 80px 20px 20px !important;
        gap: 0 !important;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3) !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        z-index: 1000 !important;
        justify-content: flex-start !important;
    }

    /* Show menu when active */
    .nav-menu.active {
        right: 0 !important;
    }

    /* Menu items styling */
    .nav-menu li {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    .nav-menu a {
        width: 100% !important;
        padding: 1rem !important;
        text-align: left !important;
        font-size: 1.1rem !important;
        border-radius: 8px !important;
        display: block !important;
    }

    .nav-menu a:hover {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: translateX(5px) !important;
    }

    /* Dark overlay when menu is open */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 280px;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* Footer responsive */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 2rem !important;
    }

    .footer-col {
        text-align: center !important;
    }

    .footer-col ul {
        padding: 0 !important;
    }

    .footer-col li {
        text-align: center !important;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .nav-menu {
        width: 100% !important;
        max-width: 100% !important;
    }

    .nav-menu.active::before {
        right: 100% !important;
    }

    .logo {
        font-size: 1.3rem !important;
    }

    .mobile-menu-toggle {
        width: 28px !important;
        height: 22px !important;
    }

    .hamburger-line {
        height: 2.5px !important;
    }
}

/* Force Fixes for Admin Visibility */
.admin-table tbody tr:hover {
    color: inherit !important;
}

.admin-nav a:hover {
    background-color: #DC2626 !important;
    color: #ffffff !important;
}

/* ROBUST HOVER FIX */
.admin-table tbody tr:hover {
    background-color: #FEF3C7 !important;
    color: #1e293b !important;
}

.admin-table tbody tr:hover td {
    color: #1e293b !important;
}

.admin-table tbody tr:hover a:not(.btn) {
    color: #000000 !important;
}

/* Premium Pagination Styles */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a:hover,
.pagination a.active {
    background: var(--saffron);
    color: white;
    border-color: var(--saffron);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    transform: translateY(-2px);
}

/* Dashboard Glassmorphism & Animations */
.admin-stat-card {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    position: relative;
    overflow: hidden;
}

.admin-stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.admin-stat-card:hover::after {
    opacity: 1;
}

.admin-stat-card .stat-card-icon {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.admin-stat-card:hover .stat-card-icon {
    transform: scale(1.2) rotate(10deg);
}

/* ==================== PREMIUM SIDEBAR SCROLLBARS ==================== */
/* Admin Sidebar Scrollbar */
.admin-sidebar::-webkit-scrollbar {
    width: 8px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--saffron) 0%, #d97706 100%);
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
}

/* User Sidebar Scrollbar */
.user-sidebar-unique::-webkit-scrollbar {
    width: 8px;
}

.user-sidebar-unique::-webkit-scrollbar-track {
    background: rgba(15, 20, 25, 0.5);
    border-radius: 10px;
}

.user-sidebar-unique::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

.user-sidebar-unique::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    transform: scale(1.1);
}

/* ==================== SIDEBAR SCROLL FIX ==================== */
/* Ensure sidebars scroll smoothly */
.admin-sidebar,
.user-sidebar-unique {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* User dashboard body padding */
body:has(.user-sidebar-unique) {
    padding-left: 260px !important;
}