/*
Theme Name: Diario Del Gobernador
Theme URI: https://misterads.com
Author: Mister Ads
Author URI: https://misterads.com
Description: Auto-generated theme from HTML preview — Gutenberg blocks v5
Version: 5.0.0
License: GPL v2 or later
Text Domain: diario-del-gobernador
*/

/* ==========================================================================
   Base Reset — Prevent WP defaults from interfering
   ========================================================================== */
body {
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important;
}

html {
    margin-top: 0 !important;
}

/* Gutenberg block overrides v7 — preserve original CSS layout.
   Only raw HTML blocks need full-width override.
   Native blocks (wp:group, wp:columns) respect the original CSS. */
main > .wp-block-html {
    max-width: none !important;
}

/* Let the original CSS control max-width and padding.
   The main element preserves its original classes from the preview HTML.
   Hero/full-width sections break out of the container via negative margins. */
main > .wp-block-group.hero,
main > .wp-block-group[class*="full-width"],
main > .wp-block-group[class*="fullwidth"] {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
}

/* WordPress is-layout-constrained adds max-width to blocks.
   Remove it so the original CSS can control layout. */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: none !important;
    margin-left: unset !important;
    margin-right: unset !important;
}

/* Prevent WP block library from adding unwanted margins/padding to images */
.wp-block-column > .wp-block-image {
    margin: 0;
}

/* Query Loop blog cards — match the original card design */
.wp-block-query .wp-block-post-template {
    gap: 2rem;
}

.wp-block-query .blog-card {
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.1);
    transition: all 0.3s ease;
}

.wp-block-query .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 51, 102, 0.15);
}

.wp-block-query .blog-card .wp-block-post-featured-image img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
}

.wp-block-query .blog-card .wp-block-post-featured-image {
    margin: 0 !important;
}

/* ==========================================================================
   Preview Styles (extracted from HTML preview)
   ========================================================================== */
:root {
            --color-primary: #003366;
            --color-secondary: #F7A81B;
            --color-text-dark: #333;
            --color-text-light: #fff;
            --color-bg-light: #fff;
            --color-bg-dark: #003366;
            --color-gray-light: #f8f9fa;
            --color-gray: #6c757d;
            --color-gray-dark: #495057;
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            line-height: 1.6;
            color: var(--color-text-dark);
            background-color: var(--color-bg-light);
        }

        html {
            scroll-behavior: smooth;
        }

        /* Header */
        .header {
            background: var(--color-bg-light);
            box-shadow: 0 2px 20px rgba(0,51,102,0.1);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            transition: var(--transition);
        }

        .header.scrolled {
            box-shadow: 0 2px 20px rgba(0,51,102,0.15);
        }

        .navbar {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 2rem;
        }

        .logo {
            display: flex;
            align-items: center;
            text-decoration: none;
            color: var(--color-primary);
        }

        .logo img {
            width: 60px;
            height: auto;
            margin-right: 0.75rem;
        }

        .logo svg {
            width: 40px;
            height: 40px;
            margin-right: 0.75rem;
        }

        .logo-text {
            font-size: 1.25rem;
            font-weight: 700;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 2rem;
            align-items: center;
        }

        .nav-link {
            color: var(--color-text-dark);
            text-decoration: none;
            font-weight: 500;
            transition: var(--transition);
            position: relative;
        }

        .nav-link:hover {
            color: var(--color-primary);
        }

        .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 0;
            background-color: var(--color-secondary);
            transition: var(--transition);
        }

        .nav-link:hover::after {
            width: 100%;
        }

        .hamburger {
            display: none;
            flex-direction: column;
            cursor: pointer;
            padding: 0.5rem;
        }

        .hamburger span {
            width: 25px;
            height: 3px;
            background: var(--color-primary);
            margin: 3px 0;
            transition: var(--transition);
        }

        .hamburger.active span:nth-child(1) {
            transform: rotate(-45deg) translate(-5px, 6px);
        }

        .hamburger.active span:nth-child(2) {
            opacity: 0;
        }

        .hamburger.active span:nth-child(3) {
            transform: rotate(45deg) translate(-5px, -6px);
        }

        /* Hero */
        .hero {
            background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-gray-light) 100%);
            padding: 8rem 2rem 4rem;
            text-align: center;
            margin-top: 0;
        }

        .hero-content {
            max-width: 800px;
            margin: 0 auto;
        }

        .hero h1 {
            font-size: 3rem;
            font-weight: 700;
            color: var(--color-primary);
            margin-bottom: 1rem;
            line-height: 1.2;
        }

        .hero-slogan {
            font-size: 1.5rem;
            color: var(--color-secondary);
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .hero-subtitle {
            font-size: 1.1rem;
            color: var(--color-gray-dark);
            max-width: 600px;
            margin: 0 auto;
        }

        /* Main Content */
        .main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 4rem 2rem;
        }

        .section {
            margin-bottom: 4rem;
        }

        .section-title {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--color-primary);
            text-align: center;
            margin-bottom: 3rem;
        }

        /* Blog Grid */
        .blog-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }

        .blog-card {
            background: var(--color-bg-light);
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0,51,102,0.1);
            transition: var(--transition);
            cursor: pointer;
        }

        .blog-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 30px rgba(0,51,102,0.15);
        }

        .blog-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }

        .blog-card-content {
            padding: 1.5rem;
        }

        .blog-date {
            font-size: 0.875rem;
            color: var(--color-secondary);
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .blog-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--color-primary);
            margin-bottom: 0.75rem;
            line-height: 1.3;
        }

        .blog-excerpt {
            font-size: 0.95rem;
            color: var(--color-gray-dark);
            line-height: 1.6;
        }

        /* About Section */
        .about-section {
            background: var(--color-gray-light);
            padding: 4rem 2rem;
            margin: 4rem -2rem;
            border-radius: 20px;
        }

        .about-content {
            max-width: 1000px;
            margin: 0 auto;
            display: flex;
            gap: 3rem;
            align-items: flex-start;
        }

        .about-image {
            text-align: center;
            flex: 0 0 250px;
        }

        .about-image img,
        .about-image figure img {
            width: 250px;
            height: 250px;
            border-radius: 50%;
            object-fit: cover;
            border: 5px solid var(--color-secondary);
        }

        .about-image figure {
            margin: 0;
        }

        .about-text h3 {
            font-size: 2rem;
            color: var(--color-primary);
            margin-bottom: 1rem;
            font-weight: 700;
        }

        .about-text p {
            margin-bottom: 1.5rem;
            color: var(--color-text-dark);
            font-size: 1rem;
            line-height: 1.7;
        }

        .curriculum {
            background: var(--color-bg-light);
            padding: 2rem;
            border-radius: 12px;
            margin-top: 2rem;
            box-shadow: 0 4px 20px rgba(0,51,102,0.08);
        }

        .curriculum h4 {
            color: var(--color-primary);
            font-size: 1.25rem;
            margin-bottom: 1rem;
            font-weight: 600;
        }

        .curriculum ul {
            list-style: none;
            padding-left: 0;
        }

        .curriculum li {
            margin-bottom: 0.75rem;
            padding-left: 1.5rem;
            position: relative;
            color: var(--color-text-dark);
        }

        .curriculum li::before {
            content: '●';
            color: var(--color-secondary);
            font-weight: bold;
            position: absolute;
            left: 0;
        }

        /* Footer */
        .footer {
            background: var(--color-bg-dark);
            color: var(--color-text-light);
            text-align: center;
            padding: 3rem 2rem 2rem;
            margin-top: 0;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
        }

        .footer-links {
            margin-bottom: 2rem;
        }

        .footer-links a {
            color: var(--color-text-light);
            text-decoration: none;
            margin: 0 1rem;
            font-weight: 500;
            transition: var(--transition);
        }

        .footer-links a:hover {
            color: var(--color-secondary);
        }

        .copyright {
            font-size: 0.875rem;
            opacity: 0.8;
            border-top: 1px solid rgba(247, 168, 27, 0.2);
            padding-top: 2rem;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .nav-menu {
                position: fixed;
                left: -100%;
                top: 80px;
                flex-direction: column;
                background-color: var(--color-bg-light);
                width: 100%;
                text-align: center;
                transition: var(--transition);
                box-shadow: 0 10px 27px rgba(0,51,102,0.1);
                padding: 2rem 0;
            }

            .nav-menu.active {
                left: 0;
            }

            .nav-menu li {
                margin: 1rem 0;
            }

            .hamburger {
                display: flex;
            }

            .hero h1 {
                font-size: 2rem;
            }

            .hero-slogan {
                font-size: 1.25rem;
            }

            .section-title {
                font-size: 2rem;
            }

            .blog-grid {
                grid-template-columns: 1fr;
            }

            .about-content {
                flex-direction: column;
                text-align: center;
                gap: 2rem;
            }

            .about-image {
                flex: 0 0 auto;
            }

            .about-image img,
            .about-image figure img {
                width: 200px;
                height: 200px;
            }

            .navbar {
                padding: 1rem;
            }

            .main {
                padding: 2rem 1rem;
            }

            .about-section {
                margin: 2rem -1rem;
                padding: 3rem 1rem;
            }
        }

        @media (max-width: 480px) {
            .hero {
                padding: 6rem 1rem 3rem;
            }

            .blog-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }

            .footer-links a {
                display: block;
                margin: 0.5rem 0;
            }
        }

        /* Single post page */
        .single .main {
            max-width: 800px;
        }

        .single .entry-title {
            font-size: 2.5rem;
            color: var(--color-primary);
            font-weight: 700;
            margin-bottom: 1rem;
            line-height: 1.2;
        }

        .single .entry-meta {
            color: var(--color-secondary);
            font-weight: 600;
            margin-bottom: 2rem;
        }

        .single .entry-content p {
            margin-bottom: 1.5rem;
            line-height: 1.8;
        }

        .single .entry-content h3 {
            color: var(--color-primary);
            margin-top: 2rem;
            margin-bottom: 1rem;
        }

        /* WP block overrides for about section */
        .about-section .wp-block-columns {
            max-width: 1000px;
            margin: 0 auto;
            gap: 3rem;
            align-items: flex-start;
        }

        .about-section .wp-block-column.about-image {
            flex: 0 0 250px !important;
        }

        /* Animation classes */
        .fade-in-up {
            opacity: 1;
            transform: translateY(0);
        }

        .animate-on-scroll {
            opacity: 1;
            transform: translateY(30px);
            transition: all 0.6s ease;
        }

        .animate-on-scroll.visible {
            opacity: 1;
            transform: translateY(0);
        }
