/*
==========================================
GLOBAL/BASE STYLES & TYPOGRAPHY
==========================================
*/
:root {
    --primary-color: #007bff;        /* Core Brand Blue */
    --secondary-color: #34495e;      /* Dark Text/Heading - Softer Black */
    --accent-color: #e67e22;         /* Price Highlight (Orange) */
    --light-bg: #f8f9fa;             /* Light Gray Background */
    --border-color: #e9ecef;         /* Subtle Light Border */
    --font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body { 
    font-family: var(--font-family); 
    margin: 0; 
    overflow-x: hidden;
    padding-top: 60px; /* Base space for fixed mobile header */
    color: #343a40; 
    line-height: 1.5;
}

h1 { 
    color: var(--secondary-color); 
    font-size: 2.4em; /* Slightly larger title for service/main pages */
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 30px;
    /* Softened border for professional look on service pages */
    border-bottom: 3px solid rgba(0, 123, 255, 0.1); 
    padding-bottom: 15px;
}

a { 
    text-decoration: none; 
    color: var(--primary-color); 
    margin: 0; 
    transition: color 0.2s;
}

a:hover {
    color: #0056b3;
}

/* Table styles (for cart.php) */
table { 
    width: 95%; 
    max-width: 900px;
    border-collapse: collapse; 
    margin: 30px auto; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 6px;
    overflow: hidden;
}
th,td { 
    padding: 15px 20px; 
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.05em;
}
td {
    font-size: 0.9em;
}


/*
==========================================
MOBILE LAYOUT STYLES (< 768px)
==========================================
*/

/* --- Mobile Header/Menu Bar (Fixed Top Bar) --- */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 55px; 
    background-color: var(--primary-color);
    color: white;
    display: flex;
    /* This ensures the first item (Menu) is on the left and the last item (Cart) is on the right */
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25); 
}

.site-title {
    /* Kept only minimal properties to ensure space-between works correctly (Logo text deleted) */
    min-width: 10px; 
}

.menu-toggle, .cart-link-mobile a {
    color: white;
    padding: 5px 10px;
    font-size: 1.1em;
    font-weight: 500;
}

/* --- Mobile Cart Icon Badge Styling --- */
.mobile-cart-icon {
    position: relative; /* Base for positioning the badge */
    padding: 0 !important;
}

.cart-count-badge {
    position: absolute;
    top: -8px; /* Position above the cart icon */
    right: -10px; /* Position to the right of the cart icon */
    background-color: var(--accent-color); /* Highlight color (orange) */
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 50%; /* Makes it round */
    min-width: 15px; /* Ensures minimum size for single digits */
    text-align: center;
    border: 1px solid white; /* Border helps it stand out from the blue header */
}

.hidden-badge {
    display: none;
}

/* Ensure the cart link retains minimum tap area properties */
.cart-link-mobile a {
    padding: 5px 10px; 
    font-size: 1.1em;
    font-weight: 500;
}
.mobile-header .cart-link-mobile {
    margin-right: 0;
}
/* ----------------------------------- */


/* --- Navigation Drawer (Slide-out Menu) --- */
.main-nav-drawer {
    position: fixed;
    top: 55px; /* Aligned with mobile header height */
    left: 0;
    width: 280px; 
    max-width: 85%;
    height: calc(100% - 55px);
    background-color: white;
    box-shadow: 2px 0 15px rgba(0,0,0,0.2);
    z-index: 999;
    transform: translateX(-100%); 
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-nav-drawer.open {
    transform: translateX(0); 
}

/* Menu Item Stacking Fix */
.main-nav-drawer a {
    display: block; 
    padding: 15px 20px;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    margin: 0; 
}

.category-menu-section h3 {
    padding: 15px 20px 5px;
    color: var(--primary-color);
    margin: 0;
    font-size: 0.9em;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.main-nav-drawer .active-filter {
    background-color: #e6f0ff; 
    color: var(--primary-color);
    border-left: 5px solid var(--primary-color);
    font-weight: 600;
}

/* Hide desktop elements on mobile */
.desktop-only, .filters, .desktop-nav-bar {
    display: none !important;
}

/* --- Service Card Styles (Mobile) --- */
.content-wrapper {
    padding: 0 15px; 
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px;
    padding: 10px 0 30px;
}

.service-card {
    /* Refined Card Look */
    box-shadow: 0 6px 15px rgba(0,0,0,0.08); 
    border: none; 
    border-radius: 10px; 
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-image {
    width: 100%;
    height: 180px; 
    object-fit: cover; 
    border-bottom: 1px solid var(--border-color);
}

.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
    box-sizing: border-box; /* IMPORTANT: Ensures padding is inside the element width */
}

.card-content h3 {
    font-size: 1.25em;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-weight: 600;
    line-height: 1.25;
    min-height: 3.2em; /* Ensure consistent alignment */
    border-bottom: none;
    padding-bottom: 0;
}

.card-content .description {
    color: #5a6268; /* Slightly lighter text for readability */
    font-size: 0.9em;
    margin-bottom: 15px;
    flex-grow: 1; 
}

.card-content .price {
    font-weight: 700;
    color: #c0631b; /* Using darker accent for price emphasis */
    font-size: 1.4em; 
    margin: 15px 0 15px;
}

.add-to-cart-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px; /* Enhanced padding */
    font-size: 1em;
    /* FIX: Changed background to accent color for distinction and clarity */
    background-color: var(--accent-color); 
    color: white; /* Button text is white for high contrast */
    border-radius: 6px; 
    margin: 0 !important;
    font-weight: 600;
    text-transform: uppercase; /* Enhanced look */
    box-sizing: border-box; /* CRITICAL: Ensures button width is constrained */
    transition: background-color 0.3s;
    position: relative; 
    z-index: 2;
}

.add-to-cart-btn:hover,
.add-to-cart-btn:active,
.add-to-cart-btn:focus {
    background-color: #c0631b;
    box-shadow: none; 
}


/*
==========================================
FOOTER STYLES (Mobile and Desktop)
==========================================
*/
.site-footer {
    background-color: var(--secondary-color);
    color: #bdbdbd;
    padding: 40px 20px 20px;
    border-top: 5px solid var(--primary-color);
    font-size: 0.9em;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-bottom: 30px;
}

.footer-info, .footer-links, .footer-contact {
    width: 100%; /* Default to full width on mobile */
    margin-bottom: 30px;
}

.site-footer h3 {
    color: white;
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links a {
    color: #bdbdbd;
    display: block;
    padding: 3px 0;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.8em;
    color: #999;
}


/*
==========================================
HOME PAGE (INDEX.PHP) STYLES
==========================================
*/

.hero-bg {
    /* You must place your image (e.g., 'hero_home.jpg') in an 'images' folder */
    background: linear-gradient(rgba(0, 123, 255, 0.8), rgba(0, 123, 255, 0.7)), url('images/hero_home.jpg') center center no-repeat;
    background-size: cover;
    color: white; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.hero-section {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--light-bg);
    margin-bottom: 30px;
    border-radius: 8px;
}

.hero-section h1 {
    color: white; 
    font-size: 3em;
    border-bottom: none;
    margin-bottom: 15px;
}

.hero-section .tagline {
    color: white;
    font-size: 1.2em;
    margin-bottom: 40px;
}

/* ENHANCED BOOK SERVICE BUTTON (Used in Hero section) */
.large-btn {
    padding: 16px 32px; 
    font-size: 1.2em; 
    font-weight: 700; 
    background-color: var(--accent-color); 
    border: 2px solid var(--accent-color);
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.4); 
    transition: all 0.3s ease;
    
    display: inline-block; 
    width: auto;
    max-width: 90%;
}

.large-btn:hover {
    background-color: #c0631b; 
    box-shadow: 0 6px 15px rgba(230, 126, 34, 0.6);
    transform: translateY(-2px); 
}

/* Featured Section (Uses existing service-grid/service-card styles) */
.featured-section {
    padding: 20px 0;
    margin-bottom: 40px;
}

.featured-section h2 {
    text-align: center;
    color: var(--secondary-color);
    font-size: 2em;
    margin-bottom: 30px;
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 30px;
    font-size: 1.1em;
    font-weight: 600;
}


/* Testimonials Enhanced Look */
.testimonials-section {
    padding: 40px 0;
    background-color: var(--light-bg);
    margin-bottom: 40px;
    border-radius: 8px;
}

.testimonials-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.testimonial-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 0 15px;
}

.testimonial-card {
    position: relative;
    padding: 30px 20px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    flex: 1 1 300px; 
    min-width: 280px;
    border-top: 4px solid var(--accent-color);
    text-align: left;
}

.testimonial-card .quote-icon {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 2.5em;
    color: var(--primary-color);
    opacity: 0.2;
    line-height: 1;
    font-family: serif;
}

.testimonial-card .quote {
    font-style: italic;
    color: #444;
    font-size: 1em;
    margin-top: 0;
    padding-top: 15px;
    line-height: 1.6;
}

.testimonial-card .source {
    font-weight: 600;
    color: var(--secondary-color);
    text-align: right;
    font-size: 0.9em;
}

.testimonial-card .service-name {
    font-weight: normal;
    font-size: 0.8em;
    color: #777;
}

/* Upcoming Services */
.upcoming-section {
    padding: 20px 0 50px;
    text-align: center;
}

.upcoming-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    font-size: 1.1em;
}

.upcoming-list li {
    padding: 8px 0;
    color: var(--secondary-color);
    font-weight: 500;
}

.tagline-small {
    color: #6c757d;
    font-size: 0.9em;
}


/*
==========================================
MEDIA QUERY OVERRIDES (Desktop View >= 768px)
==========================================
*/
@media (min-width: 768px) {
    body {
        padding-top: 80px; 
    }
    
    /* Responsive adjustment for small phones (nested for max-width) */
    @media (max-width: 480px) {
        .large-btn {
            display: block; /* Make it full width on very small phones */
            font-size: 1.1em;
            padding: 14px 25px;
            margin-left: auto;
            margin-right: auto;
        }
    }
    
    /* --- Desktop Navigation Styles --- */
    .desktop-nav-bar {
        display: block !important; 
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        height: 80px;
        background-color: white; 
        box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
        border-bottom: 3px solid var(--primary-color); 
    }

    .nav-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 100%;
    }
    
    .nav-logo {
        color: var(--secondary-color); 
        font-size: 1.5em;
        font-weight: 700;
    }
    
    .nav-links {
        list-style: none;
        padding: 0;
        display: flex;
        align-items: center;
    }
    
    .nav-links li {
        margin-left: 30px; 
    }

    .nav-links a {
        color: var(--secondary-color); 
        font-weight: 500;
        padding: 10px 0; 
        text-transform: uppercase; 
        font-size: 0.9em;
        transition: color 0.3s, border-bottom 0.3s;
        border-bottom: 3px solid transparent;
    }

    .nav-links a:hover, .nav-links a.active-link {
        color: var(--primary-color); 
        border-bottom: 3px solid var(--primary-color); 
    }
    
    .nav-links .cart-btn {
        background-color: var(--accent-color); 
        color: white;
        padding: 8px 18px;
        border-radius: 4px;
        margin-left: 40px;
        font-weight: 600;
        border: none;
        transition: background-color 0.3s;
    }
    
    .nav-links .cart-btn:hover {
        background-color: #c0631b; 
        border-bottom: none;
    }

    /* CRITICAL: Hides mobile elements on desktop */
    .mobile-header, .main-nav-drawer, .cart-link-mobile {
        display: none !important;
    }

    /* --- Content and Filter --- */
    .content-wrapper {
        padding: 0;
        max-width: 1200px; 
        margin: 0 auto; 
    }

    .content-wrapper h1 {
        font-size: 2.5em;
    }

    /* --- Service Page Filter Bar Enhancement --- */
    .filters {
        display: block !important;
        padding: 20px 0;
        margin: 40px 0;
        border: 1px solid var(--border-color);
        background-color: var(--light-bg);
        border-radius: 6px;
        text-align: center;
        overflow-x: auto;
        white-space: nowrap;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .filters a {
        padding: 10px 22px;
        margin: 0 8px;
        border: 1px solid #ccc; /* Ensure non-active links have visible border */
        border-radius: 20px;
        background-color: white; /* Ensure non-active links have a clean background */
        font-size: 0.95em;
        transition: background-color 0.2s, transform 0.2s;
    }
    
    .filters a:hover:not(.active-filter) {
        background-color: #f0f0f0;
        transform: translateY(-2px);
    }

    .filters a.active-filter {
        /* FIX: Active filter color set to white background and dark text for contrast */
        background-color: white; 
        color: var(--secondary-color); 
        border-color: var(--primary-color); 
        box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
    }
    
    /* --- Service Grid Enhancement --- */
    .service-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 40px;
        padding: 30px 0;
    }
    
    .service-card:hover {
        transform: translateY(-8px); 
        box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
    }
    
    .service-image {
        height: 240px; 
    }
    
    .card-content {
        padding: 20px;
    }
    
    /* Footer layout for desktop */
    .footer-info, .footer-links, .footer-contact {
        width: 30%; /* Three columns */
    }

    /* Desktop override for Hero section */
    .hero-section {
        padding: 100px 40px; 
        margin-top: 20px; 
    }
    
    .hero-section h1 {
        font-size: 4.5em; 
    }
}