/* THE EXACT CSS CORRECTION FOR EVEN HORIZONTAL FILL */
.homepage-prime-inner img {
    width: 100% !important;     /* Instructs the narrow graphic to expand evenly across the slot box */
    height: auto !important;    /* Maintains the original file proportions so nothing looks stretched */
    min-height: 90px;
    max-height: 250px;          /* Clamps the vertical boundary smoothly */
    object-fit: cover;          /* Beautifully centers and fills the canvas area without distortion */
    display: block;
    margin: 0 auto;
    border: 0;
}
/* Core Document Resets */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #ffffff; color: #333333; line-height: 1.5; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* 1. Header & Top Navigation Row - Mobile Height Fix */
header { 
    background: #3d2314 url('../images/header-sliver.jpg') repeat top center; 
    padding: 15px 0; 
    width: 100%; 
    position: relative;
}
.nav-row { display: block; overflow: hidden; }
.logo { float: left; color: #f4c430; font-size: 24px; font-weight: bold; text-decoration: none; margin-top: 5px; }
.nav-links { float: right; list-style: none; margin-top: 8px; }
.nav-links li { display: inline-block; margin-left: 20px; }
.nav-links a { color: #ffffff; text-decoration: none; font-size: 15px; font-weight: bold; }
.nav-links a:hover { color: #f4c430; }
.btn-app { background: #007733; color: #ffffff !important; padding: 8px 16px; border-radius: 4px; }
.btn-app:hover { background: #009944; }

/* 2. Responsive Hero Banner Engine */
.hero { 
    background: #55331c url('../images/hero-banner.jpg') no-repeat center center; 
    background-size: cover; 
    color: #ffffff; 
    padding: 80px 0; 
    text-align: left; 
    position: relative;
}
/* Dark transparent overlay to make your white header text highly readable over any busy food photo background */
.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}
.hero-content { 
    max-width: 650px; 
    position: relative;
    z-index: 2; /* Keeps your text sitting safely on top of the dark overlay overlay */
}
.hero h1 { font-size: 38px; margin-bottom: 15px; font-weight: bold; text-shadow: 2px 2px 4px rgba(0,0,0,0.6); }
.hero p { font-size: 19px; margin-bottom: 25px; color: #ffffff; text-shadow: 1px 1px 3px rgba(0,0,0,0.6); }
.btn-hero { display: inline-block; background: #e47911; color: #ffffff !important; padding: 12px 24px; text-decoration: none; font-weight: bold; border-radius: 4px; }

/* Responsive Multi-Screen adjustments */
@media screen and (max-width: 768px) {
    .hero { padding: 50px 0; text-align: center; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 16px; }
}

/* 3. The 12 Category Slot Grid Area */
.category-section { padding: 40px 0; text-align: center; }
.category-section h2 { font-size: 28px; margin-bottom: 30px; text-transform: uppercase; letter-spacing: 1px; }
.grid-holder { display: block; overflow: hidden; margin-right: -1%; margin-left: -1%; }
.category-card { float: left; width: 14.66%; margin: 1%; background: #ffffff; border: 1px solid #e0e0e0; padding: 20px 10px; text-align: center; text-decoration: none; color: #333333; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.category-card:hover { border-color: #3d2314; background: #fafafa; }
.category-card img { 
    width: 80%;       /* Makes the food image stretch beautifully to fill the card */
    max-width: 120px; /* Prevents it from getting too giant on big Smart TVs */
    height: auto;     /* Maintains a perfect square proportion so it never distorts */
    margin: 0 auto 12px auto; 
    display: block; 
}
.category-card span { display: block; font-size: 14px; font-weight: bold; }

/* 4. Footer & AdSense Auto Ad Placement */
footer { background: #2f3640; color: #ffffff; padding: 30px 0; text-align: center; margin-top: 40px; clear: both; }
.ad-slot-container { max-width: 728px; margin: 0 auto 20px auto; background: #ffffff; padding: 10px; border-radius: 4px; text-align: center; }
.footer-info { font-size: 13px; color: #cdcdcd; }
.footer-info a { color: #f4c430; text-decoration: none; margin: 0 10px; }

/* ==========================================================================
   Cross-Platform Layout Media Queries (Smart TV, Desktop, Tablet, Mobile Phone)
   ========================================================================== */

/* Medium Desktops / Large Tablets */
@media screen and (max-width: 1024px) {
    .category-card { width: 23%; margin: 1%; }
}

/* Small Tablets / Large Phones */
@media screen and (max-width: 768px) {
    .logo { float: none; display: block; text-align: center; margin-bottom: 15px; }
    .nav-links { float: none; display: block; text-align: center; }
    .nav-links li { margin: 0 8px 10px 8px; }
    .category-card { width: 31.33%; }
    .hero { text-align: center; padding: 40px 0; }
}

/* Mobile Phones (Portrait) */
@media screen and (max-width: 480px) {
    .category-card { width: 48%; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
}

/* Smart TVs (Scale optimizations for high resolution large visibility screen grids) */
@media screen and (min-width: 1920px) {
    .container { max-width: 1600px; }
    .category-card span { font-size: 18px; }
    .nav-links a { font-size: 18px; }
}

/* --- CATEGORY GRID SYSTEM --- */ /* 1. The Container Box for the Entire Grid */ .category-grid { width: 100%; max-width: 1200px; margin: 0 auto; text-align: center; } /* 2. The Individual Card Wrapper */ .recipe-card { display: inline-block; width: 140px; /* Gives a neat spacing container for your 120px tile */ margin: 15px; vertical-align: top; text-align: center; } /* 3. The Missing Image Rule That Fixes Your Blur Problem */ .recipe-card img { width: 120px !important; /* Forces the image to stay exactly its true size */ height: 120px !important; /* Locks the height to a clean pixel box */ display: block; margin: 0 auto 10px auto; /* Centers the graphic and leaves space for the text below */ border: none; /* Removes ugly blue borders in older offline browsers */ } /* 4. The Category Link Text Under the Tile */ .recipe-card a { color: #3d2314; /* Your dark brown texture backup color */ font-weight: bold; text-decoration: none; font-family: Arial, sans-serif; font-size: 14px; }

/* Container Box */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Flex Grid Engine for Modern Screens & Smart TVs */
.recipe-grid {
    display: -webkit-box; /* Support older Safari/Webkit browsers */
    display: -ms-flexbox;  /* Support IE 10 */
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    justify-content: center;
}

/* Individual Grid Card Base Elements */
.recipe-card {
    display: inline-block; /* Fallback for legacy offline explorer browsers */
    width: 160px;          /* Clean boundary width for card items */
    margin: 12px;
    text-align: center;
    text-decoration: none;
    vertical-align: top;
    color: #3d2314;        /* Primary Dark Brown Brand Color */
    font-family: Arial, sans-serif;
}

/* THE FIX: Absolute Pixel Bounds for the Images */
.recipe-card img {
    width: 120px !important;   /* Pulls image down to exact 120px layout tile size */
    height: 120px !important;  /* Locks square aspect scale */
    border: none;              /* Kills ancient browser blue link outline rules */
    display: block;
    margin: 0 auto 8px auto;   /* Centers image above title */
}

/* Typography Constraints */
.recipe-card h3 {
    font-size: 13px;
    line-height: 1.3;
    margin: 4px 0;
    font-weight: bold;
}
.recipe-stars {
    color: #ffcc00;            /* Yellow Star Accent */
    font-size: 12px;
    display: block;
}

/* Smooth Scroll "Back to Top" Anchor Styles */ .back-to-top-container { text-align: right; padding: 15px 15px 0 15px; clear: both; } .back-to-top-btn { display: inline-block; background: #e47911; /* Matches your high-contrast orange branding button color */ color: #ffffff !important; text-decoration: none; font-size: 13px; font-weight: bold; text-transform: uppercase; padding: 8px 16px; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } .back-to-top-btn:hover { background: #cc6d0e; }

/* Recipe Details Split Grid Wrapper */
.recipe-details-grid {
    clear: both;
    width: 100%;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #3d2314; /* Neat divider line using your brand brown */
}

/* Float columns for desktop viewing */
.ingredients-column {
    float: left;
    width: 38%;
    margin-right: 4%;
}
.instructions-column {
    float: left;
    width: 58%;
}

/* Typography styles matching your structural scale */
.recipe-details-grid h2 {
    font-size: 22px;
    color: #3d2314;
    margin-bottom: 15px;
    font-family: Arial, sans-serif;
}
.recipe-details-grid ul, .recipe-details-grid ol {
    margin: 0 0 20px 20px;
    padding: 0;
}
.recipe-details-grid li {
    font-size: 15px;
    color: #444444;
    line-height: 1.6;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
}

/* Responsive override to stack columns perfectly on mobile screens */
@media screen and (max-width: 900px) {
    .ingredients-column, .instructions-column {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 25px;
    }
}

/* --- MASTER SEASONINGS GRID ENGINE --- */
.seasoning-page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: Arial, sans-serif;
}
.seasoning-main-heading {
    font-size: 28px;
    color: #3d2314; /* Brand Dark Brown */
    text-align: center;
    margin-bottom: 30px;
}

/* Flexbox rows for modern viewports, falls back to block rows naturally */
.seasoning-flex-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

/* Standard Spice Card (Slots 1 to 7) */
.spice-card {
    display: inline-block;
    width: 210px;
    margin: 12px;
    background: #ffffff;
    text-align: center;
    vertical-align: top;
}
.spice-card img {
    width: 200px !important;
    height: 150px !important;
    object-fit: cover;
    border: 1px solid #e2ddda;
    display: block;
    margin: 0 auto;
}

/* Master Mixture Highlight Box (Slot 8) */
.master-mixture-card {
    display: block;
    width: 460px;
    margin: 20px auto;
    background: #ffffff;
    text-align: center;
}
.master-mixture-card img {
    width: 450px !important;
    height: 240px !important;
    object-fit: cover;
    border: 2px solid #3d2314; /* Darker border highlighting final blend */
    display: block;
    margin: 0 auto;
}

/* Typography for label slots under graphics */
.spice-label {
    display: block;
    font-size: 13px;
    font-style: italic;
    color: #555555;
    text-align: left;
    padding: 6px 0 0 5px;
    margin-top: 4px;
}
.master-label {
    display: block;
    font-size: 15px;
    font-weight: bold;
    color: #3d2314;
    text-align: center;
    margin-top: 8px;
}

/* Complete responsive collapse for mobile layouts */
@media screen and (max-width: 768px) {
    .spice-card, .master-mixture-card {
        width: 100% !important;
        margin: 15px 0;
    }
    .spice-card img, .master-mixture-card img {
        width: 100% !important;
        height: auto !important;
    }
    .spice-label {
        text-align: center;
    }
}

/* --- MOBILE APP LANDING PAGE SYSTEM --- */
.app-landing-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 15px;
    font-family: Arial, sans-serif;
}

/* Two-column layout grid for desktop screens */
.app-grid-row {
    display: block;
    overflow: hidden;
    margin-top: 20px;
}
.app-left-visuals {
    float: left;
    width: 48%;
    margin-right: 4%;
    text-align: center;
}
.app-right-details {
    float: left;
    width: 48%;
}

/* App Graphic Controls - Locks dimensions to ensure pixel clarity */
.app-preview-img {
    max-width: 100%;
    height: auto !important;
    border: none;
    border-radius: 12px; /* Smooth modern screen corners */
}

/* App Download Badges Layout */
.app-badge-container {
    margin: 25px 0;
}
.app-download-btn {
    display: block;
    max-width: 280px;
    padding: 14px 20px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 15px;
    text-decoration: none;
    border-radius: 6px;
    color: #ffffff !important;
}
.btn-apple-store {
    background: #111111; /* Sleek Black Apple Style */
    border: 1px solid #444444;
}
.btn-google-play {
    background: #0066cc; /* Clean Play Store Blue */
    border: 1px solid #0052a3;
}

/* Feature Checklists */
.app-feature-list {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}
.app-feature-list li {
    font-size: 15px;
    color: #444444;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Responsive Collapse for Small Smartphone Viewports */
@media screen and (max-width: 768px) {
    .app-left-visuals, .app-right-details {
        float: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 30px;
    }
    .app-download-btn {
        margin: 15px auto;
    }
}
/* ==========================================================================
   HIGH PERFORMANCE FULL-WIDTH AD INTERFACE STYLES (FIXED & RESPONSIVE)
   ========================================================================== */
.homepage-prime-ad-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 25px auto 10px auto;
    padding: 0 15px;
    text-align: center;
    box-sizing: border-box;
}

.homepage-prime-inner {
    background: #fafafa;
    border: 1px dashed #cccccc;
    padding: 10px;
    min-height: 90px;
    box-sizing: border-box;
    width: 100%;
    /* Replaced 'overflow: hidden' so banners don't get cropped */
    overflow: visible; 
}
/* ==========================================================================
   UNIFIED GLOBAL PERSONAL AD & ADSENSE RESPONSIVE FIX
   Ensures top, middle, directory, and bottom slots fit perfectly across all devices
   ========================================================================== */

/* 1. Clear floating layout elements so header/hero sections don't collapse slot widths */
.homepage-prime-ad-wrapper,
.directory-prime-ad-wrapper,
.category-prime-ad-wrapper,
.app-page-middle-ad-wrapper,
.app-page-middle-bottom-ad-wrapper,
.recipe-pages-middle-bottom-ad-wrapper,
.footer-ad-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
    box-sizing: border-box;
    clear: both; /* Prevents nearby floated elements from distorting the banner width */
}

/* 2. Inner card containers across all pages */
.homepage-prime-inner,
.homepage-bottom-inner,
.directory-prime-inner,
.category-prime-inner,
.app-page-middle-ad,
.app-page-middle-bottom-ad,
.recipe-pages-middle-bottom-ad {
    background: #fafafa;
    border: 1px dashed #cccccc;
    padding: 10px;
    min-height: 90px;
    width: 100%;
    box-sizing: border-box;
    display: block;
    overflow: visible;
}

/* 3. Horizontal Banner Images (Top, Middle, Directory, and Bottom Slots) */
.homepage-prime-inner img, 
.homepage-bottom-inner img,
.directory-prime-inner img, 
.category-prime-inner img,
.app-page-middle-ad-wrapper img,
.app-page-middle-bottom-ad img,
.recipe-pages-middle-bottom-ad img,
.homepage-prime-inner ins.adsbygoogle img,
.homepage-bottom-inner ins.adsbygoogle img {
    width: 100% !important;
    height: auto !important;           /* Proportional scaling matches directory perfection */
    min-height: 90px;
    max-height: none !important;       /* Removes vertical crop ceilings */
    object-fit: contain !important;   /* Displays full graphic without trimming */
    display: block !important;
    margin: 0 auto !important;
    border: 0 !important;
}

/* 4. Square Sidebar & Column Banner Blocks */
.about-page-sidebar-ad-box img,
.contact-sidebar-ad-box img,
.recipe-top-ad img {
    width: 100% !important;
    height: auto !important;
    max-width: 336px;
    max-height: 280px;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    border: 0 !important;
}

/* 5. AdSense Dynamic Ins Wrapper Overrides (Prevents Script Height Overrides) */
.homepage-prime-inner ins.adsbygoogle,
.homepage-bottom-inner ins.adsbygoogle,
.directory-prime-inner ins.adsbygoogle,
.category-prime-inner ins.adsbygoogle,
.app-page-middle-ad-wrapper ins.adsbygoogle,
.app-page-middle-bottom-ad ins.adsbygoogle,
.recipe-pages-middle-bottom-ad ins.adsbygoogle {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
}
/* ==========================================================================
   YOUTUBE EMBED & PLACEHOLDER IMAGE STYLES
   ========================================================================== */
.youtube-embed-box {
    position: relative;
    padding-bottom: 56.25%; /* Maintains 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000000;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.youtube-embed-box iframe,
.youtube-embed-box a.video-placeholder-link,
.youtube-embed-box img.video-placeholder-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

.youtube-embed-box img.video-placeholder-img {
    object-fit: cover !important; /* Crops cleanly inside the 16:9 ratio across all devices */
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Subtle hover interaction indicating clickability */
.youtube-embed-box a.video-placeholder-link:hover img.video-placeholder-img {
    transform: scale(1.02);
    filter: brightness(1.05);
}
/* ==========================================================================
   PROGRAMMABLE GOOGLE SEARCH DESIGN ALIGNMENT 
   Forces the programmatic script elements to obey your custom layout rules
   ========================================================================== */
.directory-search-wrapper {
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
/* Styles the internal Google button components to fit your warm brand dark brown */
.gsc-search-button-v2, 
button.gsc-search-button {
    background-color: #3d2314 !important;
    border-color: #3d2314 !important;
    border-radius: 4px !important;
}
.gsc-search-button-v2:hover, 
button.gsc-search-button:hover {
    background-color: #e47911 !important;
    border-color: #e47911 !important;
}
.gsc-input-box {
    border: 1px solid #cccccc !important;
    border-radius: 4px !important;
}
/* ==========================================================================
   ADSENSE MULTIPLEX NATIVE GRID PROTECTIONS
   Clamps multi-ad thumbnail feeds so they remain stable on mobile SIM tracking
   ========================================================================== */
.recipe-bottom-multiplex-wrapper {
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.recipe-bottom-multiplex-wrapper ins img {
    width: auto !important; /* Overrides global full-width scaling so individual mini-grid thumbnails don't stretch */
    height: auto !important;
    object-fit: contain !important;
}
@media screen and (max-width: 768px) {
    .recipe-bottom-multiplex-wrapper {
        max-width: 100% !important;
        margin: 25px 0 10px 0 !important;
        padding: 10px !important;
    }
}
/* ==========================================================================
   HIGH-VIEWABILITY INLINE VIDEO INJECTION HOOKS
   Clamps the video stream horizontal ad banner so it scales with fluid rows
   ========================================================================== */
.inline-video-ad-injection img {
    width: 100% !important;
    height: auto !important;
    min-height: 90px !important;
    max-height: 120px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto !important;
    border: 0 !important;
}
@media screen and (max-width: 900px) {
    .inline-video-ad-injection {
        margin: 15px 0 0 0 !important;
        padding: 8px !important;
    }
}
/* ==========================================================================
   FORCE GOOGLE SEARCH RESULTS TO COLLAPSE SPACE WHEN INACTIVE
   ========================================================================== */
.directory-search-results-holder,
.directory-search-results-holder .gcse-searchresults-only,
.directory-search-results-holder #___gcse_1,
.directory-search-results-holder .gsc-control-cse {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    min-height: 0 !important;
}

/* Hides the results box entirely if there are no visible search result items */
.directory-search-results-holder:not(:has(.gsc-webResult)) {
    display: none !important;
}