/* 
 * Core Design System for ANANDA THIRTHA APPS SOLUTIONS 
 * Theme: Classic, Professional, Corporate IT Services
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #0a2540;
    --primary-light: #163c61;
    --accent: #00d4ff;
    --accent-hover: #00aacc;
    --text-dark: #0a2540;
    --text-muted: #425466;
    --text-light: #ffffff;
    --bg-light: #f6f9fc;
    --bg-white: #ffffff;
    --bg-dark: #0a2540;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 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);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* --- Layout Components --- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

/* --- Navigation --- */

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    z-index: 1100;
}

/* --- Hero Section --- */

.hero {
    background: linear-gradient(rgba(10, 37, 64, 0.8), rgba(10, 37, 64, 0.8)), url('../images/home-hero.png');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 160px 0 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.inner-hero {
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
}

.inner-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.85);
    /* Dark overlay */
    z-index: 1;
}

.inner-hero .container {
    position: relative;
    z-index: 2;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-light);
    transform: skewY(-2deg);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* --- Buttons --- */

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.btn-outline:hover {
    background: var(--text-light);
    color: var(--primary);
}

/* --- WhatsApp Floating Button --- */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* --- Responsive & Mobile Menu --- */

@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1100;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 10px;
        display: block;
    }

    .nav-cta {
        display: none;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .inner-hero h1 {
        font-size: 2.2rem;
    }
}

/* --- Admin Panel --- */
.sidebar {
    width: 260px;
    background: var(--primary);
    color: white;
    padding: 30px 0;
    flex-shrink: 0;
}

.sidebar-logo {
    padding: 0 30px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.nav-item {
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    opacity: 0.8;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    border-left: 4px solid var(--accent);
}

.main-content {
    flex: 1;
    padding: 40px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: 0.3s ease-in-out;
        width: 260px !important;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        width: 100%;
        padding: 20px;
        margin-top: 60px;
        /* Space for mobile header */
    }

    /* Mobile Header */
    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #0f172a;
        color: white;
        z-index: 900;
        align-items: center;
        padding: 0 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        justify-content: space-between;
    }

    .menu-toggle {
        font-size: 1.5rem;
        cursor: pointer;
        background: none;
        border: none;
        color: white;
    }

    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Responsive Tables */
    .table-container,
    .card {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
        /* Force scroll */
    }

    /* Grid Adjustments */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

.mobile-header {
    display: none;
}


/* Drawer Mobile Responsiveness */
@media (max-width: 768px) {
    .drawer {
        width: 100% !important;
        right: -100% !important;
        padding: 20px !important;
    }

    .drawer.open {
        right: 0 !important;
    }

    /* Adjust input grids in drawer on mobile */
    .drawer form>div[style*='grid-template-columns'] {
        grid-template-columns: 1fr !important;
    }

    .price-row {
        grid-template-columns: 1fr !important;
    }
}


/* --- Drawer System (Desktop Defaults) --- */
.drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease-in-out;
    z-index: 2000;
    padding: 30px;
    overflow-y: auto;
}

.drawer.open {
    right: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1999;
}

.drawer-overlay.open {
    display: block;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}


/* --- Mobile Layout Fixes (Phase 2) --- */
@media (max-width: 768px) {

    /* Responsive Page Headers */
    .page-header,
    .main-content>div:first-child,
    .main-content>header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .page-header>div:last-child,
    .main-content>div:first-child>div:last-child {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .page-header .btn,
    .main-content>div:first-child .btn {
        flex: 1 !important;
        display: flex;
        justify-content: center;
        white-space: nowrap;
    }

    /* Responsive Filter Bars */
    .filter-bar,
    form.filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar button {
        width: 100% !important;
        flex: none !important;
    }

    /* Responsive Modals */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 15px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .full-width {
        grid-column: span 1 !important;
    }

    /* Stats Grid fix */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}