/*
 Theme Name:   GlutenFreeMode
 Description:  Custom child theme for GlutenFreeMode - Best Gluten Free Recipes
 Author:       GlutenFreeMode
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  glutenfreemode-child
*/

/* ===========================================
   DESIGN SYSTEM
   =========================================== */

:root {
    /* Brand Colors */
    --gfm-primary: #fa4984;
    --gfm-primary-dark: #d83a6e;
    --gfm-primary-light: #ffdee9;
    --gfm-accent: #e8326a;
    --gfm-accent-dark: #c42858;
    --gfm-accent-light: #fff0f4;
    --gfm-warm: #f5dde4;
    --gfm-warm-light: #fef7f9;

    /* Neutrals */
    --gfm-bg: #FDFAF6;
    --gfm-bg-alt: #F4F0EB;
    --gfm-card-bg: #FFFFFF;
    --gfm-text: #1A1A2E;
    --gfm-text-secondary: #4B5563;
    --gfm-text-muted: #9CA3AF;
    --gfm-border: #E5E7EB;
    --gfm-border-light: #F3F4F6;

    /* Radius */
    --gfm-radius-sm: 8px;
    --gfm-radius-md: 12px;
    --gfm-radius-lg: 16px;
    --gfm-radius-xl: 24px;
}


/* ===========================================
   GLOBAL OVERRIDES
   =========================================== */

body {
    background-color: #fff !important;
}

.wp-post-image {
    border: none !important;
}

.wp-post-image:hover {
    border: none !important;
}


/* Recipe step headings */
.rs-h2 {
    color: var(--gfm-text);
    background: var(--gfm-primary-light);
    padding: 12px 20px;
    border-radius: var(--gfm-radius-sm);
    margin: 48px 0 20px;
}

.rs-h3 {
    color: var(--gfm-text);
    margin: 28px 0 10px;
}

.rs-step {
    color: #fff;
    background: var(--gfm-primary);
    display: inline-block;
    padding: 5px 22px;
    border-radius: 50px;
    margin: 18px 0 9px;
    font-weight: 700;
    font-size: 22px;
}


/* ===========================================
   HOMEPAGE - Full Width Layout
   =========================================== */

.gfm-homepage .site-content {
    max-width: 100% !important;
    padding: 0 !important;
}

.gfm-homepage #primary {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gfm-homepage #main {
    margin: 0;
    padding: 0;
}


/* Featured Recipes Row */
.gfm-featured-section {
    background: #fff;
    padding: 20px 20px 0;
}

.gfm-featured-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.gfm-featured-item {
    position: relative;
    display: block;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: var(--gfm-radius-md);
}

.gfm-featured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gfm-featured-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: var(--gfm-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    padding: 10px 12px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: var(--gfm-radius-sm);
}


/* Hero Section */
.gfm-hero {
    background: linear-gradient(170deg, #ffdee9 0%, #fff5f8 50%, #fff0f4 100%);
    padding: 56px 20px 48px;
    border-bottom: 1px solid var(--gfm-border);
}

.gfm-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.gfm-hero-content {
    text-align: left;
}

.gfm-hero-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--gfm-text);
    margin: 0 0 12px;
    line-height: 1.15;
}

.gfm-hero-highlight {
    color: var(--gfm-primary);
}

.gfm-hero-subtitle {
    font-size: 17px;
    font-weight: 400;
    color: var(--gfm-text-secondary);
    margin: 0 0 28px;
    line-height: 1.5;
}

.gfm-hero-search {
    position: relative;
}

.gfm-hero-search input[type="search"] {
    width: 100%;
    padding: 18px 60px 18px 22px;
    border: 2px solid var(--gfm-border);
    border-radius: var(--gfm-radius-md);
    font-size: 16px;
    background: #fff;
    color: var(--gfm-text);
    outline: none;
}

.gfm-hero-search input[type="search"]:focus {
    border-color: var(--gfm-primary);
}

.gfm-hero-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: var(--gfm-primary);
    color: #fff;
    border-radius: var(--gfm-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gfm-hero-search button:hover {
    background: var(--gfm-primary-dark);
}

.gfm-hero-search button svg {
    width: 30px;
    height: 30px;
}

.gfm-hero-stat {
    margin: 24px 0 0;
    font-size: 17px;
    color: var(--gfm-text-secondary);
}

.gfm-hero-stat strong {
    color: var(--gfm-primary);
    font-weight: 800;
    font-size: 20px;
}

/* Hero Categories */
.gfm-hero-categories {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 36px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.gfm-hero-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 6px;
}

.gfm-hero-cat img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}

.gfm-hero-cat-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--gfm-text);
}

/* Hero Mosaic */
.gfm-hero-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    height: 340px;
}

.gfm-hero-mosaic-item {
    border-radius: var(--gfm-radius-md);
    overflow: hidden;
}

.gfm-hero-mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gfm-hero-mosaic-item:first-child {
    grid-row: 1 / 3;
    border-radius: var(--gfm-radius-lg);
}


/* Section shared styles */
.gfm-section {
    padding: 64px 20px;
}

.gfm-section-alt {
    background: var(--gfm-bg-alt);
}

.gfm-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.gfm-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.gfm-section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--gfm-text);
    margin: 0 0 8px;
}

.gfm-section-subtitle {
    font-size: 17px;
    color: var(--gfm-text-muted);
    margin: 0;
    font-weight: 400;
}

.gfm-section-title .gfm-title-accent {
    color: var(--gfm-accent);
}


/* Email Signup Section */
.gfm-signup-section {
    background: transparent;
    padding: 20px 20px;
}

.gfm-signup-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.gfm-signup-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--gfm-text);
    white-space: nowrap;
}

.gfm-signup-form {
    display: flex;
    gap: 8px;
    flex: 1;
}

.gfm-signup-form input[type="email"] {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--gfm-border);
    border-radius: 50px;
    font-size: 15px;
    background: #fff;
    color: var(--gfm-text);
    outline: none;
}

.gfm-signup-form input[type="email"]::placeholder {
    color: var(--gfm-text-muted);
}

.gfm-signup-form input[type="email"]:focus {
    border-color: var(--gfm-primary);
}

.gfm-signup-form button {
    padding: 12px 24px;
    background: var(--gfm-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.gfm-signup-form button:hover {
    background: var(--gfm-primary-dark);
}


/* Popular Recipes Section */
.gfm-popular-section {
    padding: 16px 20px 48px;
    background: #fff;
}

.gfm-popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.gfm-popular-card {
    display: block;
    text-decoration: none;
    color: var(--gfm-text);
}

.gfm-popular-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--gfm-radius-lg);
    overflow: hidden;
    position: relative;
}

.gfm-popular-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gfm-popular-card-title {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: var(--gfm-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    padding: 10px 14px;
    margin: 0;
    text-align: center;
    border-radius: var(--gfm-radius-sm);
}


/* Categories Section */
.gfm-categories-section {
    padding: 40px 20px;
    background: #fff;
}

.gfm-categories-header {
    text-align: center;
    margin-bottom: 28px;
}

.gfm-categories-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--gfm-text);
    margin: 0;
}

.gfm-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.gfm-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gfm-text);
    text-align: center;
}

.gfm-category-item:hover .gfm-category-name {
    color: var(--gfm-primary);
}

.gfm-category-thumb {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    border: 3px solid var(--gfm-border-light);
    transition: transform 0.2s ease;
}

.gfm-category-item:hover .gfm-category-thumb {
    transform: scale(1.06);
}

.gfm-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.gfm-category-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--gfm-text);
}

.gfm-category-count {
    font-size: 13px;
    color: var(--gfm-text-muted);
    font-weight: 400;
}


/* About Section */
.gfm-about {
    background: var(--gfm-primary-dark);
    padding: 48px 20px;
}

.gfm-about-inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.gfm-about-avatar {
    flex-shrink: 0;
}

.gfm-about-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.25);
}

.gfm-about-content {
    color: #fff;
}

.gfm-about-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.5);
    margin: 0 0 4px;
}

.gfm-about-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}

.gfm-about-bio {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255,255,255,0.75);
    margin: 0 0 10px;
}

.gfm-about-link {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gfm-about-link:hover {
    color: #fff;
}


/* Pagination */
.paging-navigation .nav-links,
.pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 0;
}

.paging-navigation .nav-links a,
.paging-navigation .nav-links span,
.pagination .nav-links a,
.pagination .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--gfm-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.paging-navigation .nav-links a,
.pagination .nav-links a {
    background: var(--gfm-card-bg);
    color: var(--gfm-text);
    border: 1px solid var(--gfm-border);
}

.paging-navigation .nav-links a:hover,
.pagination .nav-links a:hover {
    background: var(--gfm-primary);
    color: #fff;
}

.paging-navigation .nav-links .current,
.pagination .nav-links .current {
    background: var(--gfm-primary);
    color: #fff;
}


/* ===========================================
   ARCHIVE / CATEGORY PAGES
   =========================================== */

.gfm-cat-header {
    text-align: center;
    padding: 40px 20px 32px;
}

.gfm-cat-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--gfm-text);
    margin: 0 0 6px;
}

.gfm-cat-desc {
    font-size: 16px;
    color: var(--gfm-text-muted);
    margin: 0;
}

.gfm-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 0 0 40px;
}

.gfm-cat-card {
    display: block;
    text-decoration: none;
    color: var(--gfm-text);
}

.gfm-cat-card-img {
    aspect-ratio: 4/3;
    border-radius: var(--gfm-radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
}

.gfm-cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gfm-cat-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    text-align: center;
    color: var(--gfm-text);
}

.gfm-cat-card:hover .gfm-cat-card-title {
    color: var(--gfm-primary);
}

.gfm-cat-pagination {
    padding: 0 0 32px;
    text-align: center;
}

.gfm-cat-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gfm-cat-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: var(--gfm-text);
    background: var(--gfm-bg-alt);
    border: 1px solid var(--gfm-border);
}

.gfm-cat-pagination .page-numbers:hover {
    background: var(--gfm-primary);
    color: #fff;
    border-color: var(--gfm-primary);
}

.gfm-cat-pagination .page-numbers.current {
    background: var(--gfm-primary);
    color: #fff;
    border-color: var(--gfm-primary);
}

.gfm-cat-pagination .page-numbers.next,
.gfm-cat-pagination .page-numbers.prev {
    font-size: 18px;
}

.gfm-cat-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gfm-text-muted);
}

@media (max-width: 768px) {
    .gfm-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .gfm-cat-title {
        font-size: 28px;
    }

    .gfm-cat-card-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .gfm-cat-grid {
        gap: 12px;
    }

    .gfm-cat-card-title {
        font-size: 14px;
    }
}



/* ===========================================
   RECIPE COMPILATION TITLES
   =========================================== */

h2.recipecomtitle {
    background: var(--gfm-primary-light);
    font-size: 24px;
    font-weight: 800;
    margin: 48px 0 24px;
    padding: 18px 24px;
    border-radius: var(--gfm-radius-sm);
}

h2.recipecomtitle a {
    color: var(--gfm-primary-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

h2.recipecomtitle a:hover {
    color: var(--gfm-primary);
}


/* ===========================================
   SINGLE POST
   =========================================== */

body.single .entry-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gfm-border-light);
}

body.single .entry-meta a:hover {
    color: var(--gfm-accent);
}

body.single .post-tags a {
    display: inline-block;
    padding: 4px 14px;
    background: var(--gfm-bg-alt);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gfm-text-secondary);
    margin: 3px;
}

body.single .post-tags a:hover {
    background: var(--gfm-primary);
    color: #fff;
}

/* Comments */
.comments-area {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--gfm-border-light);
}

.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"],
.comments-area .comment-form textarea {
    border: 2px solid var(--gfm-border);
    border-radius: var(--gfm-radius-sm);
    padding: 12px 16px;
}

.comments-area .comment-form input:focus,
.comments-area .comment-form textarea:focus {
    border-color: var(--gfm-primary);
    outline: none;
}

.comments-area .form-submit input[type="submit"] {
    background: var(--gfm-primary);
    color: #fff;
    font-weight: 700;
    padding: 12px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 14px;
}

.comments-area .form-submit input[type="submit"]:hover {
    background: var(--gfm-primary-dark);
}


/* ===========================================
   SIDEBAR
   =========================================== */

.widget {
    background: var(--gfm-card-bg);
    border-radius: var(--gfm-radius-lg);
    padding: 24px;
    border: 1px solid var(--gfm-border);
    margin-bottom: 24px;
}

.widget-title {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gfm-border-light);
}


/* ===========================================
   FOOTER
   =========================================== */

.site-footer {
    color: var(--gfm-text);
}

.site-footer a {
    color: var(--gfm-text);
}

.site-footer a:hover {
    color: var(--gfm-primary);
}

.site-footer .copyright-bar {
    width: 100% !important;
}

.gfm-footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 12px;
}

.gfm-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 6px;
}

.gfm-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gfm-footer-site-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--gfm-text);
}

.gfm-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gfm-bg-alt);
    color: var(--gfm-text-secondary);
    transition: background 0.2s ease, color 0.2s ease;
}

.gfm-footer-social:hover {
    background: #1877F2;
    color: #fff !important;
}

.gfm-footer-social svg {
    display: block;
}

.gfm-footer-pages {
    display: flex;
    gap: 28px;
}

.gfm-footer-pages a {
    color: var(--gfm-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.gfm-footer-pages a:hover {
    color: var(--gfm-primary);
}

.gfm-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gfm-footer-disclaimer {
    font-size: 13px;
    color: var(--gfm-text-secondary);
    margin: 0;
}

.gfm-footer-copy {
    font-size: 13px;
    color: var(--gfm-text-muted);
    margin: 0;
}

@media (max-width: 768px) {
    .gfm-footer-top {
        flex-direction: column;
        gap: 12px;
    }

    .gfm-footer-pages {
        gap: 20px;
    }

    .gfm-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
}


/* ===========================================
   WP RECIPE MAKER CARD
   =========================================== */

.wprm-recipe-container {
    border-radius: var(--gfm-radius-lg) !important;
    margin: 32px 0;
}


/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 1024px) {
    .gfm-popular-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .gfm-categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px 16px;
    }

    .gfm-category-thumb {
        width: 100px;
        height: 100px;
    }

    .gfm-about-inner {
        flex-direction: column;
        text-align: center;
    }

    .gfm-section-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .gfm-featured-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .gfm-hero {
        padding: 36px 16px 32px;
    }

    .gfm-hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .gfm-hero-content {
        text-align: center;
    }

    .gfm-hero-mosaic {
        height: 240px;
    }

    .gfm-hero-title {
        font-size: 28px;
    }

    .gfm-hero-subtitle {
        font-size: 15px;
    }

    .gfm-hero-stat {
        text-align: center;
    }

    .gfm-hero-categories {
        justify-content: center;
    }

    .gfm-section {
        padding: 40px 16px;
    }

    .gfm-section-title {
        font-size: 26px;
    }

    .gfm-signup-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .gfm-signup-title {
        white-space: normal;
    }

    .gfm-signup-form {
        width: 100%;
    }

    .gfm-popular-section {
        padding: 40px 16px;
    }

    .gfm-popular-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gfm-popular-card-title {
        font-size: 13px;
        padding: 6px 10px;
    }

    .gfm-categories-title {
        font-size: 24px;
    }

    .gfm-categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px 10px;
    }

    .gfm-category-thumb {
        width: 80px;
        height: 80px;
    }

    .gfm-category-name {
        font-size: 14px;
    }

    .gfm-category-count {
        font-size: 12px;
    }

    .gfm-about {
        padding: 36px 16px;
    }

    .gfm-about-inner {
        flex-direction: column;
        text-align: center;
    }

    .gfm-about-avatar img {
        width: 80px;
        height: 80px;
    }

    .gfm-about-name {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .gfm-categories-section {
        padding: 32px 12px;
    }

    .gfm-category-thumb {
        width: 70px;
        height: 70px;
    }

    .gfm-category-name {
        font-size: 13px;
    }
}
