/*
 Theme Name: RCAD AdSense Pro Child
 Theme URI: https://recursoscad.com
 Author: RecursosCAD
 Author URI: https://recursoscad.com
 Description: Child theme profesional de Orbital optimizado para aprobación de Google AdSense. Incluye páginas legales, navegación completa, footer con enlaces de políticas, y diseño limpio orientado a contenido original.
 Version: 1.0.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Template: orbital
 Text Domain: rcad-adsense
 Tags: one-column, two-columns, right-sidebar, custom-menu, featured-images, footer-widgets, theme-options, translation-ready
*/

/* ==========================================================================
   0. CSS VARIABLES & RESET
   ========================================================================== */

:root {
    --rcad-primary: #f5a623;
    --rcad-primary-dark: #e09100;
    --rcad-primary-light: #ffecd2;
    --rcad-text: #333333;
    --rcad-text-light: #666666;
    --rcad-text-muted: #999999;
    --rcad-bg: #ffffff;
    --rcad-bg-alt: #f8f9fa;
    --rcad-bg-dark: #1a1a2e;
    --rcad-bg-footer: #16213e;
    --rcad-border: #e0e0e0;
    --rcad-border-light: #f0f0f0;
    --rcad-success: #28a745;
    --rcad-radius: 8px;
    --rcad-radius-lg: 12px;
    --rcad-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --rcad-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --rcad-transition: all 0.3s ease;
    --rcad-font-body: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --rcad-font-heading: 'Syne', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --rcad-container: 1200px;
}

/* ==========================================================================
   1. TOPBAR - Barra superior informativa
   ========================================================================== */

.rcad-topbar {
    background: var(--rcad-bg-dark);
    color: #ccc;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 2px solid var(--rcad-primary);
}

.rcad-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
}

.rcad-topbar__info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.rcad-topbar__info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rcad-topbar__social {
    display: flex;
    gap: 12px;
}

.rcad-topbar__social a {
    color: #ccc;
    text-decoration: none;
    transition: var(--rcad-transition);
}

.rcad-topbar__social a:hover {
    color: var(--rcad-primary);
}

@media (max-width: 768px) {
    .rcad-topbar {
        display: none;
    }
}

/* ==========================================================================
   2. HEADER / NAVBAR OVERRIDES
   ========================================================================== */

.site-header {
    background: var(--rcad-bg) !important;
    box-shadow: var(--rcad-shadow);
    position: sticky;
    top: 0;
    z-index: 999;
}

.site-header .header-inner {
    max-width: var(--rcad-container);
}

.site-header .site-logo a,
.site-header .site-logo img {
    max-height: 50px;
    width: auto;
}

.primary-menu > li > a {
    font-family: var(--rcad-font-heading);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rcad-text) !important;
    padding: 18px 16px !important;
    transition: var(--rcad-transition);
    position: relative;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
    color: var(--rcad-primary) !important;
}

.primary-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--rcad-primary);
    transition: var(--rcad-transition);
    transform: translateX(-50%);
}

.primary-menu > li > a:hover::after,
.primary-menu > li.current-menu-item > a::after {
    width: 100%;
}

/* Submenus */
.primary-menu .sub-menu {
    background: var(--rcad-bg);
    border: 1px solid var(--rcad-border-light);
    border-top: 3px solid var(--rcad-primary);
    box-shadow: var(--rcad-shadow-hover);
    border-radius: 0 0 var(--rcad-radius) var(--rcad-radius);
    min-width: 220px;
}

.primary-menu .sub-menu li a {
    padding: 10px 20px !important;
    font-size: 13px;
    color: var(--rcad-text) !important;
    border-bottom: 1px solid var(--rcad-border-light);
}

.primary-menu .sub-menu li a:hover {
    background: var(--rcad-primary-light);
    color: var(--rcad-primary-dark) !important;
}

/* ==========================================================================
   3. HOME - Secciones personalizadas
   ========================================================================== */

/* Hero Section - Estilo tipo RevitFamilias */
.rcad-hero {
    background: linear-gradient(135deg, var(--rcad-bg-dark) 0%, #0f3460 70%, #1a3a6e 100%);
    color: #fff;
    padding: 70px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rcad-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: var(--rcad-primary);
    opacity: 0.06;
    border-radius: 50%;
}

.rcad-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -8%;
    width: 350px;
    height: 350px;
    background: #fff;
    opacity: 0.03;
    border-radius: 50%;
}

.rcad-hero__container {
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Badge superior tipo RevitFamilias */
.rcad-hero__badge {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 20px;
    border-radius: 50px;
    margin-bottom: 24px;
    letter-spacing: 0.3px;
}

/* Título principal con highlight blocks */
.rcad-hero__title {
    font-family: var(--rcad-font-heading);
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #fff;
}

.rcad-hero__highlight {
    background: #fff;
    color: var(--rcad-bg-dark);
    padding: 2px 14px;
    border-radius: 4px;
    display: inline;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.rcad-hero__highlight--italic {
    font-style: italic;
    background: var(--rcad-primary);
    color: #fff;
}

/* Descripción detallada */
.rcad-hero__desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.75);
    max-width: 720px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.rcad-hero__cta {
    display: inline-flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.rcad-hero__cta a {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--rcad-radius);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--rcad-transition);
    letter-spacing: 0.5px;
}

.rcad-btn--primary {
    background: var(--rcad-primary);
    color: #fff !important;
}

.rcad-btn--primary:hover {
    background: var(--rcad-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245,166,35,0.4);
}

.rcad-btn--outline {
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff !important;
}

.rcad-btn--outline:hover {
    border-color: var(--rcad-primary);
    background: rgba(245,166,35,0.1);
}

/* Categorías destacadas */
.rcad-categories {
    padding: 50px 0;
    background: var(--rcad-bg-alt);
}

.rcad-categories__container {
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
}

.rcad-section-title {
    text-align: center;
    margin-bottom: 40px;
}

.rcad-section-title h2 {
    font-family: var(--rcad-font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--rcad-text);
    margin-bottom: 8px;
}

.rcad-section-title p {
    color: var(--rcad-text-muted);
    font-size: 1rem;
}

.rcad-section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--rcad-primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.rcad-categories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.rcad-category-card {
    background: var(--rcad-bg);
    border-radius: var(--rcad-radius-lg);
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--rcad-text);
    border: 1px solid var(--rcad-border-light);
    transition: var(--rcad-transition);
    display: block;
}

.rcad-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rcad-shadow-hover);
    border-color: var(--rcad-primary);
}

.rcad-category-card__icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: block;
}

.rcad-category-card__name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.rcad-category-card__count {
    font-size: 0.8rem;
    color: var(--rcad-text-muted);
}

/* Últimos artículos */
.rcad-latest {
    padding: 50px 0;
}

.rcad-latest__container {
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* About / Confianza Section - CLAVE PARA ADSENSE */
.rcad-about {
    padding: 50px 0;
    background: var(--rcad-bg-alt);
}

.rcad-about__container {
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
}

.rcad-about__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.rcad-about__item {
    background: var(--rcad-bg);
    border-radius: var(--rcad-radius-lg);
    padding: 32px 24px;
    border: 1px solid var(--rcad-border-light);
    text-align: center;
}

.rcad-about__item-icon {
    width: 56px;
    height: 56px;
    background: var(--rcad-primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

.rcad-about__item h3 {
    font-family: var(--rcad-font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--rcad-text);
}

.rcad-about__item p {
    color: var(--rcad-text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==========================================================================
   4. CARDS / LOOPS - Artículos en grid
   ========================================================================== */

/* Override Orbital cards */
.entry-item {
    border-radius: var(--rcad-radius-lg) !important;
    overflow: hidden;
    border: 1px solid var(--rcad-border-light) !important;
    transition: var(--rcad-transition);
    background: var(--rcad-bg);
}

.entry-item:hover {
    box-shadow: var(--rcad-shadow-hover);
    transform: translateY(-3px);
}

.entry-item .entry-header img,
.entry-item .post-thumbnail img {
    border-radius: var(--rcad-radius-lg) var(--rcad-radius-lg) 0 0;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.entry-item .entry-title {
    font-family: var(--rcad-font-heading);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.entry-item .entry-title a {
    color: var(--rcad-text);
    text-decoration: none;
}

.entry-item .entry-title a:hover {
    color: var(--rcad-primary);
}

.entry-read-more {
    color: var(--rcad-primary) !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   5. SINGLE POST - Mejoras para contenido largo
   ========================================================================== */

.single .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--rcad-text);
}

.single .entry-content h2 {
    font-family: var(--rcad-font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 2em;
    margin-bottom: 0.6em;
    color: var(--rcad-text);
    border-left: 4px solid var(--rcad-primary);
    padding-left: 16px;
}

.single .entry-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 1.5em;
    color: var(--rcad-text);
}

.single .entry-content p {
    margin-bottom: 1.2em;
}

.single .entry-content img {
    border-radius: var(--rcad-radius);
    box-shadow: var(--rcad-shadow);
}

/* Breadcrumbs */
.rcad-breadcrumbs {
    background: var(--rcad-bg-alt);
    padding: 12px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--rcad-border-light);
}

.rcad-breadcrumbs .container {
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
}

.rcad-breadcrumbs a {
    color: var(--rcad-primary);
    text-decoration: none;
}

.rcad-breadcrumbs span.separator {
    margin: 0 8px;
    color: var(--rcad-text-muted);
}

/* ==========================================================================
   6. PÁGINAS LEGALES - Esenciales para AdSense
   ========================================================================== */

.page-template-default .entry-content,
.rcad-legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.rcad-legal-content h1 {
    font-family: var(--rcad-font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--rcad-text);
}

.rcad-legal-content .rcad-legal-updated {
    color: var(--rcad-text-muted);
    font-size: 0.85rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rcad-border);
}

.rcad-legal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.5em;
    color: var(--rcad-text);
}

.rcad-legal-content p,
.rcad-legal-content li {
    color: var(--rcad-text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

.rcad-legal-content ul {
    padding-left: 24px;
    margin-bottom: 1.2em;
}

.rcad-legal-content ul li {
    margin-bottom: 6px;
}

/* ==========================================================================
   7. FOOTER PROFESIONAL CON MENÚ LEGAL
   ========================================================================== */

.site-footer {
    background: var(--rcad-bg-footer) !important;
    color: #ccc;
    padding: 0 !important;
}

/* Footer widgets */
.rcad-footer-main {
    padding: 50px 0 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rcad-footer-main .container {
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
}

.rcad-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .rcad-footer__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.rcad-footer__col h4 {
    color: #fff;
    font-family: var(--rcad-font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.rcad-footer__col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--rcad-primary);
    border-radius: 2px;
}

.rcad-footer__col p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.7;
}

.rcad-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rcad-footer__col ul li {
    margin-bottom: 10px;
}

.rcad-footer__col ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--rcad-transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rcad-footer__col ul li a::before {
    content: '›';
    color: var(--rcad-primary);
    font-weight: bold;
}

.rcad-footer__col ul li a:hover {
    color: var(--rcad-primary);
    padding-left: 4px;
}

/* Footer Legal Bar - CRUCIAL PARA ADSENSE */
.rcad-footer-legal {
    padding: 20px 0;
    background: rgba(0,0,0,0.15);
}

.rcad-footer-legal .container {
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.rcad-footer-legal__copy {
    color: #888;
    font-size: 0.82rem;
}

.rcad-footer-legal__nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.rcad-footer-legal__nav a {
    color: #888;
    text-decoration: none;
    font-size: 0.82rem;
    transition: var(--rcad-transition);
}

.rcad-footer-legal__nav a:hover {
    color: var(--rcad-primary);
}

/* Separador visual entre links legales */
.rcad-footer-legal__nav a + a::before {
    content: '|';
    margin-right: 20px;
    color: rgba(255,255,255,0.15);
}

/* ==========================================================================
   8. COOKIE CONSENT BANNER
   ========================================================================== */

.rcad-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--rcad-bg-dark);
    color: #ccc;
    padding: 16px 20px;
    z-index: 9999;
    display: none;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.rcad-cookie-banner.active {
    display: block;
}

.rcad-cookie-banner__inner {
    max-width: var(--rcad-container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.rcad-cookie-banner p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    flex: 1;
}

.rcad-cookie-banner p a {
    color: var(--rcad-primary);
    text-decoration: underline;
}

.rcad-cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.rcad-cookie-btn {
    padding: 8px 20px;
    border-radius: var(--rcad-radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--rcad-transition);
}

.rcad-cookie-btn--accept {
    background: var(--rcad-primary);
    color: #fff;
}

.rcad-cookie-btn--accept:hover {
    background: var(--rcad-primary-dark);
}

.rcad-cookie-btn--reject {
    background: transparent;
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.2);
}

.rcad-cookie-btn--reject:hover {
    border-color: #ccc;
}

/* ==========================================================================
   9. AD SLOTS - Contenedores AdSense
   ========================================================================== */

.rcad-ad-slot {
    background: var(--rcad-bg-alt);
    border: 1px dashed var(--rcad-border);
    border-radius: var(--rcad-radius);
    padding: 10px;
    margin: 24px 0;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rcad-ad-slot--header {
    margin-bottom: 0;
    border-radius: 0;
}

.rcad-ad-slot--sidebar {
    margin-bottom: 20px;
}

.rcad-ad-slot--incontent {
    margin: 30px auto;
    max-width: 728px;
}

.rcad-ad-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rcad-text-muted);
    display: block;
    margin-bottom: 4px;
}

/* ==========================================================================
   10. 404 PAGE
   ========================================================================== */

.rcad-404 {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.rcad-404__code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--rcad-primary);
    line-height: 1;
    margin-bottom: 16px;
    font-family: var(--rcad-font-heading);
}

.rcad-404 h1 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.rcad-404 p {
    color: var(--rcad-text-light);
    margin-bottom: 24px;
}

.rcad-404 .search-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ==========================================================================
   11. RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
    .rcad-hero__title {
        font-size: 2rem;
    }
    .rcad-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
    .rcad-categories__grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 600px) {
    .rcad-hero {
        padding: 50px 0 40px;
    }
    .rcad-hero__badge {
        font-size: 0.75rem;
        padding: 5px 14px;
    }
    .rcad-hero__title {
        font-size: 1.5rem;
    }
    .rcad-hero__highlight {
        padding: 1px 10px;
    }
    .rcad-hero__desc {
        font-size: 0.9rem;
    }
    .rcad-section-title h2 {
        font-size: 1.4rem;
    }
    .rcad-footer__grid {
        grid-template-columns: 1fr;
    }
    .rcad-footer-legal .container {
        flex-direction: column;
        text-align: center;
    }
    .rcad-footer-legal__nav {
        justify-content: center;
    }
}

/* ==========================================================================
   12. UTILIDADES
   ========================================================================== */

.rcad-container {
    max-width: var(--rcad-container);
    margin: 0 auto;
    padding: 0 20px;
}

.rcad-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Override Orbital footer widgets to hide default */
.site-footer .widget-area-footer {
    display: none !important;
}

.site-footer .credits {
    display: none !important;
}

/* Scroll to top */
.rcad-scroll-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--rcad-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--rcad-shadow);
    transition: var(--rcad-transition);
    z-index: 998;
}

.rcad-scroll-top.visible {
    display: flex;
}

.rcad-scroll-top:hover {
    background: var(--rcad-primary-dark);
    transform: translateY(-3px);
}
