/* =========================================
   ICE MAN RECOVERY - MASTER STYLESHEET
   Table of Contents:
   1. Variables & Resets
   2. Typography & Utilities
   3. Layout Structure
   4. Header & Navigation
   5. Buttons & Forms
   6. Cards & UI Components
   7. Package Colors (Starter, Popular, etc.)
   8. Page Specifics (Hero, Dashboard, Modals)
   9. Footer
   ========================================= */

/* =========================================
   1. VARIABLES & RESETS
   ========================================= */
:root {
    /* Brand Colors */
    --ice-blue: #0A84C6;
    --ice-blue-hover: #076496;
    --heat-red: #D32F2F;
    --dark-bg: #111111;
    --dark-surface: #1A1A1A;
    --white: #FFFFFF;
    --off-white: #F9F9F9;
    --light-grey: #E0E0E0;
    --text-main: #333333;
    --text-muted: #666666;

    /* Package Colors */
    --pkg-starter: #0A84C6;
    --pkg-popular: #D32F2F;
    --pkg-elite: #A9A9A9;
    --pkg-premium: #D4AF37;

    /* Layout & UI */
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease-in-out;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--ice-blue);
    transition: var(--transition);
}

a:hover {
    color: var(--ice-blue-hover);
}

ul {
    list-style: none;
}

/* =========================================
   2. TYPOGRAPHY & UTILITIES
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-bg);
    line-height: 1.2;
    margin-bottom: 15px;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 15px; }

.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }

/* =========================================
   3. LAYOUT STRUCTURE
   ========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

/* Responsive CSS Grid */
.grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
.main-navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo img {
    height: 50px;
    margin-left: 20px;
}

/* Mobile Menu Button */
.menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-bg);
    background: none;
    border: none;
    margin-right: 20px;
}

.nav-links {
    display: none;
    width: 100%;
    position: absolute;
    top: 80px;
    left: 0;
    margin-right: 20px;
    background: var(--white);
    flex-direction: column;
    text-align: center;
    box-shadow: var(--shadow-md);
    padding: 20px 0;
}

.nav-links.active {
    display: flex;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 600;
    padding: 10px 20px;
    display: block;
}

@media (min-width: 768px) {
    .menu-toggle { display: none; }
    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        width: auto;
        box-shadow: none;
        padding: 0;
        align-items: center;
        gap: 20px;
    }
}

/* =========================================
   UPDATED HERO SPLIT SECTION
   ========================================= */
.hero-split {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 60px 20px 0 20px; /* Zero padding at the bottom so the image touches the next section */
    overflow: hidden;
}

.hero-align {
    align-items: center;
}

.hero-text {
    padding-bottom: 60px; /* Adds breathing room on mobile */
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--light-grey);
    letter-spacing: 1px;
    margin-bottom: 30px;
    font-weight: 600;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--light-grey);
    margin-bottom: 20px;
}

.text-blue {
    color: var(--ice-blue);
}

.font-bold {
    font-weight: 700;
}

.hero-quote {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    border-left: 4px solid var(--ice-blue);
    padding-left: 15px;
}

.hero-quote .signature {
    font-family: 'Brush Script MT', cursive, sans-serif; /* Emulates the signature style */
    font-size: 1.8rem;
    color: var(--white);
    font-weight: 400;
}

.hero-image {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Anchors the image to the bottom */
    height: 100%;
}

.hero-image img {
    max-height: 700px; /* Prevents the 1000px image from blowing out the screen on desktop */
    width: auto;
    object-fit: contain;
    display: block;
}

/* Specific Mobile Adjustments for the new Hero */
@media (max-width: 767px) {
    .hero-split .grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-image img {
        max-height: 500px;
    }
}

/* =========================================
   5. BUTTONS & FORMS
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--border-radius);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--ice-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--ice-blue-hover);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--heat-red);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--ice-blue);
    color: var(--ice-blue);
}

.btn-outline:hover {
    background-color: var(--ice-blue);
    color: var(--white);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-bg);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-grey);
    border-radius: var(--border-radius);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--ice-blue);
    box-shadow: 0 0 0 3px rgba(10, 132, 198, 0.2);
}

/* POPIA Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--ice-blue); }
input:checked + .slider:before { transform: translateX(26px); }

/* =========================================
   6. CARDS & UI COMPONENTS
   ========================================= */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 25px;
    border: 1px solid var(--light-grey);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-img {
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    text-align: center;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.card-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ice-blue);
    margin-bottom: 15px;
}

/* Update for Service Cards with Full-Width Images */
.service-card {
    padding: 0; /* Removes default padding so image touches edges */
    overflow: hidden; /* Ensures the image respects the card's border-radius */
    display: flex;
    flex-direction: column;
}

.card-img-header {
    width: 100%;
    height: 180px; /* Fixed height to keep all cards uniform */
    overflow: hidden;
}

.card-img-header img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the box without squishing */
    display: block;
    transition: transform 0.5s ease;
}

/* Subtle zoom effect when hovering over the card */
.service-card:hover .card-img-header img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1; /* Pushes the buttons to the bottom evenly across all cards */
}

/* =========================================
   7. PACKAGE SPECIFIC COLORS
   ========================================= */
.pkg-card {
    border-top: 5px solid var(--light-grey);
}

.pkg-starter { border-top-color: var(--pkg-starter); }
.pkg-popular { border-top-color: var(--pkg-popular); }
.pkg-elite { border-top-color: var(--pkg-elite); }
.pkg-premium { border-top-color: var(--pkg-premium); }

.pkg-starter h3 { color: var(--pkg-starter); }
.pkg-popular h3 { color: var(--pkg-popular); }
.pkg-elite h3 { color: var(--pkg-elite); }
.pkg-premium h3 { color: var(--pkg-premium); }

/* =========================================
   8. PAGE SPECIFICS
   ========================================= */
/* Hero Section (Index) */
.hero {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
}

/* Dashboard / Profile / Admin */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.sidebar {
    background: var(--off-white);
    padding: 20px;
    border-radius: var(--border-radius);
}

.sidebar-menu li a {
    display: block;
    padding: 10px;
    color: var(--text-main);
    border-bottom: 1px solid var(--light-grey);
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    color: var(--ice-blue);
    font-weight: 600;
    border-bottom-color: var(--ice-blue);
}

.dashboard-content {
    flex: 1;
}

@media (min-width: 992px) {
    .dashboard-layout {
        flex-direction: row;
    }
    .sidebar {
        width: 250px;
        flex-shrink: 0;
    }
}

/* Data Tables (Admin / Profile Bookings) */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-grey);
}

table th {
    background-color: var(--off-white);
    color: var(--dark-bg);
    font-weight: 600;
}

/* Modals */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out forwards;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-btn:hover {
    color: var(--heat-red);
}

/* =========================================
   9. FOOTER
   ========================================= */
.main-footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 50px 20px 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    gap: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 30px;
    margin-bottom: 20px;
}

.main-footer h4 {
    color: var(--white);
}

.main-footer a {
    color: var(--light-grey);
}

.main-footer a:hover {
    color: var(--ice-blue);
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--ice-blue);
}