/* CSS Variables */
:root {
    --primary-color: #4e73df;
    --primary-gradient: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-bg: #f8f9fc;
    --dark-bg: #5a5c69;
    --text-color: #5a5c69;
    --heading-color: #4e73df;
    --sidebar-bg: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    --card-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .15);
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--primary-color);
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--warning-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.bg-light {
    background-color: white;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(78, 115, 223, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #6c757d;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Header (Public) */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 15px;
}

.logo h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 25px;
}

nav a {
    text-decoration: none;
    color: #5a5c69;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary-color);
}

.btn-login {
    border: 2px solid var(--primary-color);
    padding: 6px 20px;
    border-radius: 50px;
    color: var(--primary-color);
}

.btn-login:hover {
    background: var(--primary-color);
    color: white;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero */
.hero {
    background: linear-gradient(rgba(34, 74, 190, 0.7), rgba(34, 74, 190, 0.7)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Cards & Grid (Shared) */
.card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: none;
    transition: transform 0.3s;
    margin-bottom: 1.5rem;
}

.services-grid,
.offers-grid,
.grid-form {
    display: grid;
    gap: 2rem;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.offers-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-form {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.service-card:hover,
.offer-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.offer-card {
    overflow: hidden;
    padding: 0;
}

.offer-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.offer-details {
    padding: 1.5rem;
}

.validity {
    display: inline-block;
    background: #eef2ff;
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4e73df;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d3e2;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fdfdfe;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 2rem;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e3e6f0;
}

.data-table th {
    background-color: #f8f9fc;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-top: 1px solid #e3e6f0;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: #f8f9fc;
}

/* Internal Layout (Admin) */
.admin-body {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fc;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-header h3 {
    margin: 0;
    color: white;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.nav-group {
    padding: 1rem 1.5rem 0.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.submenu {
    display: none;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.submenu a {
    padding-left: 3rem;
    font-size: 0.85rem;
    border-left: none;
}

.submenu a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.main-content {
    flex-grow: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
    transition: all 0.3s;
}

.top-bar {
    background-color: white;
    height: 70px;
    padding: 0 2rem;
    box-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, .15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-wrapper {
    padding: 2rem;
}

.page-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    border-bottom: 2px solid #e3e6f0;
    padding-bottom: 10px;
    display: inline-block;
}

/* Login Page Styles */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
}

.login-card h2 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }

    nav {
        width: 100%;
        display: none;
        margin-top: 1rem;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 10px 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-active {
        display: block;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .sidebar {
        left: -260px;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
}