/* ==========================================================================
   ZilaMansa.com - Main Stylesheet (Mobile First & Colorful UI)
   ========================================================================== */

/* --- 1. CSS Variables (Colors & Styling) --- */
:root {
    --primary-color: #000666;
    --secondary-color: #8b5000;
    --bg-color: #f8f9fa;
    --text-dark: #191c1d;
    --text-light: #454652;
    --white: #ffffff;
    
    /* Business Card Button Colors */
    --btn-call: #000666;      /* Blue */
    --btn-whatsapp: #25d366;  /* Green */
    --btn-location: #8b5000;  /* Red */
    --btn-insta: #c13584;     /* Purple */
    
    /* Layout Variables */
    --border-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* --- 2. Basic Reset & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
    padding-top: 20px; 
    padding-bottom: 40px; 
    
    /* ✨ MAGIC: Page Load Animation */
    opacity: 0; 
    animation: smoothLoad 0.8s ease-out forwards;
}

/* ✨ MAGIC: Fade + Slide Up Animation Keyframes */
@keyframes smoothLoad {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:active {
    opacity: 0.6;
}

/* --- 3. Main Container Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 4. Header & Navigation --- */
header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    text-align: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* --- 5. Categories Grid (Colorful & Animated) --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 items per row on mobile */
    gap: 15px;
    margin-bottom: 40px;
}

.category-card {
    padding: 20px 10px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
}

/* 🎨 MAGIC: Colorful Boxes (Overriding defaults) */
.category-card:nth-child(6n+1) { background: #fff5e6 !important; border-color: #ffdcb0 !important; }
.category-card:nth-child(6n+2) { background: #e6f7ff !important; border-color: #b0e2ff !important; }
.category-card:nth-child(6n+3) { background: #f0ffe6 !important; border-color: #c9ffb0 !important; }
.category-card:nth-child(6n+4) { background: #ffe6f2 !important; border-color: #ffb0d9 !important; }
.category-card:nth-child(6n+5) { background: #f2e6ff !important; border-color: #d1b0ff !important; }
.category-card:nth-child(6n+6) { background: #e6ffff !important; border-color: #b0ffff !important; }

/* 🌟 Hover Effect on Category Cards */
.category-card:hover {
    transform: translateY(-8px) scale(1.03) !important;
    box-shadow: 0 12px 25px rgba(0,0,0,0.12) !important;
}

.category-icon {
    font-size: 38px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

/* Icon rotation and scale on hover */
.category-card:hover .category-icon {
    transform: scale(1.2) rotate(8deg); 
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3436 !important;
}

/* --- 6. Business Card Premium Design --- */
.business-list {
    display: grid;
    grid-template-columns: 1fr; /* 1 card per row on mobile */
    gap: 25px;
}

.business-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    padding-bottom: 20px;
    transition: transform 0.3s ease;
}

.business-card:hover {
    transform: translateY(-5px);
}

/* 16:9 YouTube style aspect ratio for photo */
.business-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: #e9ecef;
}

.business-info {
    padding: 15px 20px;
}

.business-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.business-address {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* --- 7. Business Action Buttons (Single Row) --- */
.action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 0 20px;
}

.btn-action {
    flex: 1; /* Makes all buttons take equal width */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    border-radius: 8px;
    color: var(--white);
    font-size: 18px; /* Suitable size for icons */
    transition: var(--transition);
}

/* Button Colors */
.btn-call { background-color: var(--btn-call); }
.btn-whatsapp { background-color: var(--btn-whatsapp); }
.btn-location { background-color: var(--btn-location); }
.btn-insta { background-color: var(--btn-insta); }

.btn-action:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* --- 8. Footer --- */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 14px;
}

/* --- 9. Responsive Queries (For Tablets & Desktops) --- */
@media (min-width: 768px) {
    /* Tablet */
    .category-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 items per row */
    }
    .business-list {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
    }
}

@media (min-width: 1024px) {
    /* Desktop */
    body {
        padding-top: 40px;
        padding-bottom: 60px;
    }
    .business-list {
        grid-template-columns: repeat(3, 1fr); /* 3 cards per row */
    }
}
/* --- 10. Bento Grid (App Style) --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-card-app {
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 140px;
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eaeaea;
}

.bento-card-app:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.bento-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.bento-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.bento-subtitle {
    font-size: 12px;
    line-height: 1.3;
}

/* Colors matching App Theme */
.bento-c1 .bento-icon-wrapper { background: #e0f2fe; color: #0369a1; }
.bento-c1 .bento-title { color: #0f172a; }
.bento-c1 .bento-subtitle { color: #475569; }

.bento-c2 .bento-icon-wrapper { background: #dcfce7; color: #15803d; }
.bento-c2 .bento-title { color: #0f172a; }
.bento-c2 .bento-subtitle { color: #475569; }

.bento-c3 .bento-icon-wrapper { background: #f3e8ff; color: #7e22ce; }
.bento-c3 .bento-title { color: #0f172a; }
.bento-c3 .bento-subtitle { color: #475569; }

.bento-c4 .bento-icon-wrapper { background: #f1f5f9; color: #475569; }
.bento-c4 .bento-title { color: #0f172a; }
.bento-c4 .bento-subtitle { color: #475569; }

/* Gradient Cards */
.bento-grad1 {
    background: linear-gradient(135deg, var(--primary-color), #343d96); /* primary to primaryFixedVariant */
    border: none;
    color: #fff;
}
.bento-grad1 .bento-icon-wrapper { background: rgba(255,255,255,0.2); color: #fff; }
.bento-grad1 .bento-title, .bento-grad1 .bento-subtitle { color: #fff; }

.bento-grad2 {
    background: linear-gradient(135deg, var(--secondary-color), #ff9800); /* secondary to secondaryContainer */
    border: none;
    color: #fff;
}
.bento-grad2 .bento-icon-wrapper { background: rgba(255,255,255,0.2); color: #fff; }
.bento-grad2 .bento-title, .bento-grad2 .bento-subtitle { color: #fff; }

.free-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
