/*
Theme Name: Branch Financial Blog Theme
Theme URI: https://branch.com
Author: Custom Theme
Author URI: https://branch.com
Description: A custom WordPress theme for Branch Financial blog with a modern, clean design
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: branch-theme
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #f8f9fa;
    padding-top: 84px; /* offset for fixed .site-header */
}

body.nav-locked {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
}

/* ======================================================================
   Header / India navbar
   Ported from BranchServer/app/views/layouts/_navigation.html.erb (lines 36-87)
   and app/assets/stylesheets/web/all.scss (lines 282-797).
   ====================================================================== */

:root {
    --branch-navy:  #19355E;
    --branch-grey:  #666666;
    --branch-dark:  #222222;
    --branch-line:  #e5e5e5;
    --branch-white: #ffffff;
}

.site-header {
    background: var(--branch-white);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    border-bottom: 1px solid var(--branch-line);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    min-height: 84px;
    position: relative;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44.858px;
    color: var(--branch-navy);
    flex-shrink: 0;
}

.site-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44.858px;
    color: var(--branch-navy);
    text-decoration: none;
}

.site-logo img.custom-logo {
    width: 100px !important;
    height: 37px !important;
    flex-shrink: 0;
    object-fit: contain;
}

.site-logo img:not(.custom-logo),
.site-logo svg {
    width: 100px !important;
    height: 37px !important;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.site-logo span {
    width: 83.983px;
    height: 20.094px;
    color: var(--branch-navy);
    font-size: 18px;
    font-weight: 600;
    line-height: 20.094px;
    display: inline-block;
}

/* Main navigation wrapper */
.main-navigation {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    gap: 40px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation .primary-menu {
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.main-navigation .nav-link {
    list-style: none;
    padding: 0;
    position: relative;
    white-space: nowrap;
}

.main-navigation .primary-menu > .nav-link > a,
.main-navigation .primary-menu > .nav-link > .navbar-dropdown-trigger {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 1rem;
    color: var(--branch-grey);
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
    z-index: 100;
}

.main-navigation .primary-menu > .nav-link > a:hover,
.main-navigation .primary-menu > .nav-link > a:focus,
.main-navigation .primary-menu > .nav-link > a.active,
.main-navigation .primary-menu > .nav-link > .navbar-dropdown-trigger:hover,
.main-navigation .primary-menu > .nav-link > .navbar-dropdown-trigger:focus,
.main-navigation .primary-menu > .nav-link.dropdown:hover > .navbar-dropdown-trigger {
    color: var(--branch-navy);
    font-weight: 700;
}

.main-navigation .primary-menu > .nav-link > a.active::after,
.main-navigation .primary-menu > .nav-link > a:hover::after,
.main-navigation .primary-menu > .nav-link.dropdown:hover > .navbar-dropdown-trigger::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0;
    border-bottom: 2px solid var(--branch-navy);
    border-top-left-radius: 100px;
    border-top-right-radius: 100px;
    z-index: -1;
    pointer-events: none;
}

/* Dropdown caret (CSS-only chevron) */
.navbar-dropdown-caret {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.2s ease-in-out;
}

/* Desktop dropdown panel */
.main-navigation .primary-menu > .nav-link.dropdown {
    overflow: visible;
    z-index: 10;
}

.main-navigation .primary-menu > .nav-link.dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 0.75rem;
    z-index: 1;
}

.main-navigation .primary-menu > .nav-link.dropdown .dropdown-content {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 4px);
    padding: 0.5rem 0;
    min-width: 180px;
    background-color: #fff;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    z-index: 2;
    list-style: none;
    margin: 0;
    flex-direction: column;
    gap: 0;
}

.main-navigation .primary-menu > .nav-link.dropdown:hover .dropdown-content,
.main-navigation .primary-menu > .nav-link.dropdown:focus-within .dropdown-content {
    display: flex;
}

.main-navigation .primary-menu > .nav-link.dropdown .dropdown-content > .nav-link {
    padding: 0;
    text-align: center;
    width: 100%;
}

.main-navigation .primary-menu > .nav-link.dropdown .dropdown-content > .nav-link > a {
    display: block;
    font-size: 14px;
    color: var(--branch-grey);
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.main-navigation .primary-menu > .nav-link.dropdown .dropdown-content > .nav-link > a:hover,
.main-navigation .primary-menu > .nav-link.dropdown .dropdown-content > .nav-link > a.active {
    color: var(--branch-navy);
    font-weight: 700;
}

/* Login / Sign Up pill */
.header-login {
    margin-left: 24px;
    flex-shrink: 0;
    z-index: 100;
}

.navbar-web-login__btn {
    display: inline-block;
    border-radius: 24px;
    padding: 10px 18px;
    background-color: var(--branch-navy);
    border: 1px solid var(--branch-navy);
    color: #fff !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.navbar-web-login__btn:hover,
.navbar-web-login__btn:focus {
    opacity: 0.92;
    color: #fff;
}

/* Mobile hamburger (hidden on desktop) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--branch-navy);
    border-radius: 2px;
}

/* Mobile drawer header (hidden on desktop) */
.nav-close-container {
    display: none;
}

/* ===== Mobile (< 1200px) ===== */
@media (max-width: 1199.98px) {
    .header-login {
        margin-left: 0;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .main-navigation {
        display: none;
        position: fixed;
        top: 0;
        left: 0; /* Changed from right: 0 to left: 0 */
        width: 100%;
        height: 100%;
        max-width: 420px;
        background: var(--branch-white);
        z-index: 2000;
        padding: 0;
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start; /* Fix bottom-up loading */
        gap: 0;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.08); /* Flipped shadow direction */
    }

    .main-navigation.nav-md-show {
        display: flex;
    }

    .nav-close-container {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 4px 8px;
        border-bottom: 1px solid var(--branch-line);
    }

    .nav-close {
        margin-top: 4px;
        padding: 10px 16px;
        font-size: 28px;
        line-height: 1;
        color: var(--branch-dark);
        background: transparent;
        border: 0;
        cursor: pointer;
    }

    .nav-mobile-title {
        color: var(--branch-dark);
        margin-top: 4px;
        font-size: 20px;
        font-weight: 500;
        line-height: 32px;
    }

    .main-navigation .primary-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
    }

    .main-navigation .primary-menu > .nav-link {
        display: block;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--branch-line);
    }

    .main-navigation .primary-menu > .nav-link > a,
    .main-navigation .primary-menu > .nav-link > .navbar-dropdown-trigger {
        display: flex;
        width: 100%;
        padding: 22px 16px;
        font-size: 16px;
        color: var(--branch-dark);
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
    }

    .main-navigation .primary-menu > .nav-link > a.active,
    .main-navigation .primary-menu > .nav-link > a:hover,
    .main-navigation .primary-menu > .nav-link.dropdown:hover > .navbar-dropdown-trigger {
        font-weight: 700;
        color: var(--branch-dark);
    }

    /* Disable the desktop underline on mobile */
    .main-navigation .primary-menu > .nav-link > a.active::after,
    .main-navigation .primary-menu > .nav-link > a:hover::after,
    .main-navigation .primary-menu > .nav-link.dropdown:hover > .navbar-dropdown-trigger::after {
        content: none;
    }

    .navbar-dropdown-caret {
        border-color: var(--branch-navy);
        width: 10px;
        height: 10px;
    }

    .main-navigation .primary-menu > .nav-link.dropdown .dropdown-content {
        display: none;
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        background: var(--branch-white);
        flex-direction: column;
    }

    .main-navigation .primary-menu > .nav-link.dropdown.mobile-open .dropdown-content {
        display: flex;
    }

    .main-navigation .primary-menu > .nav-link.dropdown.mobile-open .navbar-dropdown-caret {
        transform: rotate(-135deg) translate(-2px, -2px);
    }

    .main-navigation .primary-menu > .nav-link.dropdown .dropdown-content > .nav-link {
        border-top: 1px solid var(--branch-line);
        text-align: left;
    }

    .main-navigation .primary-menu > .nav-link.dropdown .dropdown-content > .nav-link > a {
        display: block;
        padding: 18px 16px 18px 40px;
        font-size: 16px;
        color: #333;
        text-align: left;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #4FCDFF 0%, #7dd3fc 100%);
    padding: 80px 0 80px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero-section .container {
    padding: 0 80px;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: -300px;
    left: -400px;
    width: 800px;
    height: 800px;
    background: rgba(167, 230, 255, 0.4);
    border-radius: 50%;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -150px;
    right: -250px;
    width: 600px;
    height: 600px;
    background: rgba(167, 230, 255, 0.5);
    border-radius: 50%;
    z-index: 1;
}

.hero-section .container::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: rgba(167, 230, 255, 0.3);
    border-radius: 50%;
    z-index: 1;
}

.hero-section .container::after {
    content: '';
    position: absolute;
    bottom: -200px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(79, 205, 255, 0.3);
    border-radius: 50%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 18px;
    color: #1e293b;
    font-weight: 400;
}

/* Main Content Wrapper (Below Banner) */
.main-content-wrapper {
    display: flex;
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    align-self: stretch;
    background: #f8f9fa;
    box-sizing: border-box;
}

/* Search Section */
.search-section {
    background: transparent;
    padding: 0;
    border-bottom: none;
    width: 100%;
    align-self: flex-start;
}

.search-form-wrapper {
    display: flex;
    width: 100%;
    max-width: 1188px;
    min-height: 56px;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.search-form-wrapper .search-form {
    display: flex;
    width: 100%;
    gap: 15px;
    flex-direction: row;
    align-items: stretch; /* Ensure button and field have same height */
}

@media (max-width: 768px) {
    .search-form-wrapper {
        height: auto;
        min-height: 0;
    }

    .search-form-wrapper .search-form {
        flex-direction: column;
        gap: 12px;
    }

    .search-form-wrapper .search-field {
        width: 100%;
        box-sizing: border-box;
    }

    .search-form-wrapper .search-submit {
        width: 100%;
        min-width: 0;
        padding: 16px;
    }
}

.search-form-wrapper .search-field {
    flex: 1;
    padding: 16px 24px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
    background: #ffffff;
}

.search-form-wrapper .search-field:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.search-form-wrapper .search-submit {
    padding: 16px 50px;
    background: #38bdf8;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    white-space: nowrap;
    min-width: 150px;
}

.search-form-wrapper .search-submit:hover {
    background: #0ea5e9;
    transform: translateY(-1px);
}

/* Blog Posts Section */
.blog-posts-section {
    background: transparent;
    padding: 0;
    width: 100%;
}

.blog-posts-section .container {
    padding: 0;
    max-width: 100%;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1188px;
    gap: 24px;
    margin: 0 auto 50px;
    justify-content: center;
}

/* Post Card */
.post-card {
    display: flex;
    width: 100%;
    max-width: 380px; /* Prevent stretching on mobile */
    margin: 0 auto; /* Center the card if container is wider */
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-thumbnail,
.post-card img.wp-post-image {
    width: calc(100% + 100px) !important;
    max-width: none !important;
    height: 200px;
    object-fit: cover;
    margin: -24px -24px 0 -24px !important;
    display: block;
}

.post-content {
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    width: 100%;
    justify-content: space-between;
}

.post-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.post-read-time {
    color: #6b7280;
    font-size: 13px;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0;
    line-height: 1.4;
    width: 100%;
}

.post-title a {
    color: inherit;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #38bdf8;
}

.post-excerpt {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
    width: 100%;
}

.read-more {
    color: #38bdf8;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 5px;
}

.read-more::after {
    content: ' →';
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    display: flex;
    width: 36px;
    height: 36px;
    padding: 12px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
    text-decoration: none;
}

.pagination a:hover {
    background: #e5e7eb;
}

.pagination .current {
    background: #38bdf8;
    color: white;
}

/* Prev and Next buttons */
.pagination a.prev,
.pagination a.next {
    width: auto;
    padding: 12px 20px;
}

/* Hide dots (ellipsis) if not needed */
.pagination .dots {
    background: transparent;
    color: #9ca3af;
    pointer-events: none;
}

/* Single Post Page */
.single-post-section {
    background: #ffffff;
    padding: 50px 0;
}

.single-post-container {
    max-width: 1200px;
    padding: 0 120px;
    margin: 0 auto;
}

.single-post {
    background: #ffffff;
}

.single-post .entry-header {
    margin-bottom: 30px;
}

.single-post .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.single-post .entry-title {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
    line-height: 1.3;
}

.single-post .entry-meta {
    color: #6b7280;
    font-size: 14px;
}

.single-post .entry-meta .byline {
    font-weight: 500;
}

.single-post .post-thumbnail-large {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.single-post .post-thumbnail-large img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post .entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 40px;
}

.single-post .entry-content p {
    margin-bottom: 20px;
}

.single-post .entry-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 40px 0 20px;
}

.single-post .entry-content h3 {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    margin: 30px 0 15px;
}

/* Social Sharing Buttons */
.social-sharing {
    display: flex;
    gap: 10px;
    padding: 30px 0;
    border-top: 1px solid #e5e7eb;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.share-button {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
    border: none;
    cursor: pointer;
}

.share-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

.share-button:hover {
    opacity: 0.8;
}

.share-button.facebook {
    background: #1877f2;
}

.share-button.twitter {
    background: #1da1f2;
}

.share-button.linkedin {
    background: #0077b5;
}

.share-button.telegram {
    background: #0088cc;
}

.share-button.reddit {
    background: #ff4500;
}

.share-button.more {
    background: #6b7280;
}

/* Related Posts Section */
.related-posts-section {
    background: #f8f9fa;
    padding: 60px 0 80px;
}

.related-posts-section .section-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 40px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Footer */
.site-footer {
    background: #19355E;
    color: #e2e8f0;
    padding: 50px 0 30px;
}

.site-footer .container {
    padding: 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

/* Horizontal layout for "Curious about Branch?" section removed for vertical list */
.footer-section:first-child ul {
    display: block;
}

.footer-section:first-child ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.3s;
    text-decoration: none;
}

.footer-section a:hover {
    color: #38bdf8;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
}

.footer-section.contact-info {
    padding-left: 0;
}

.footer-section.contact-info p {
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-social-icon {
    width: 24px;
    height: 24px;
    transition: opacity 0.3s;
    color: #cbd5e1; /* Default icon color */
}

.footer-social-icon:hover {
    opacity: 0.8;
    color: #38bdf8; /* Hover color */
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-contact-item + .footer-contact-item {
    margin-top: 20px; /* Add space between contact items */
}

.footer-contact-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact-text {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
}

.download-icon {
    display: inline-block;
    margin-top: 15px;
}

.download-icon img {
    height: 40px;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 30px;
}

.footer-bottom h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.useful-links {
    display: flex;
    gap: 30px;
}

.useful-links a {
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.3s;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.useful-links a:hover {
    color: #38bdf8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container,
    .single-post-container {
        padding: 0 40px;
    }
    
    .header-container,
    .hero-section .container,
    .site-footer .container {
        padding: 0 30px;
    }
    
    .posts-grid,
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container,
    .single-post-container {
        padding: 0 20px;
    }
    
    .header-container,
    .hero-section .container,
    .site-footer .container {
        padding: 0 20px;
    }
    
    .hero-section {
        padding: 60px 0 60px;
    }

    .hero-content h1 {
        font-size: 40px;
    }
    
    .posts-grid,
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-section:nth-child(3),
    .footer-section:nth-child(4) {
        grid-column: span 2;
    }

    .search-form-wrapper .search-form {
        flex-direction: column;
    }
    
    .single-post .entry-title {
        font-size: 28px;
    }
    
    .social-sharing {
        justify-content: center;
    }
    
    .share-button {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 20px;
        min-height: 72px;
    }

    .hero-section {
        padding: 60px 0 60px;
    }

    .hero-content h1 {
        font-size: 32px;
    }
}
