/*
Theme Name: RocasTrading Pure
Theme URI: https://rocastrading.com/
Description: A high-end, minimalist luxury theme for RocasTrading. Built for speed and elegance.
Author: Antigravity
Author URI: https://antigravity.ai
Version: 1.0.0
Text Domain: rocastrading-pure
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    /* Colors */
    --color-bg: #fcfcfc;
    --color-surface: #ffffff;
    --color-text-primary: #0f172a; /* Deep Navy */
    --color-text-secondary: #475569;
    --color-accent: #b89b5e; /* Elegant Gold */
    --color-border: rgba(15, 23, 42, 0.06);
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --letter-spacing-elite: 0.15em;
    --letter-spacing-heading: -0.02em;
    
    /* Spacing */
    --spacing-xl: clamp(6rem, 15vw, 12rem);
    --container-max: 1200px;
    
    /* Editorial Focus */
    --font-heading-tight: 1.15;
    --letter-spacing-heading: -0.01em;
}

/* --- Elite Header & Menu --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: transparent;
}

header.scrolled {
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.header-actions {
    flex-shrink: 0;
}

.header-actions .btn-premium {
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 3.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 1400px) {
    .nav-links {
        gap: 1.5rem;
    }
    .nav-links a {
        font-size: 0.75rem;
    }
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    opacity: 0.6;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    color: var(--color-accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-accent);
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 25px;
}

/* Custom Cursor - Elite Focus */
.custom-cursor {
    width: 25px;
    height: 25px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 100000;
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1), 
                height 0.3s cubic-bezier(0.23, 1, 0.32, 1), 
                background-color 0.3s ease, 
                opacity 0.5s ease;
    display: block;
    opacity: 0;
    mix-blend-mode: difference;
    background-color: white;
    transform: translate3d(-100px, -100px, 0);
    /* box-shadow removed as difference mode handles it */
}

.custom-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

@media (pointer: fine) {
    * { cursor: none !important; }
    .custom-cursor { display: block !important; }
}

/* Base Reset */
* { box-sizing: border-box; }
body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    letter-spacing: var(--letter-spacing-heading);
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-elite);
}

p { margin-bottom: 1.5rem; }

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

/* Layout */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

section { padding: var(--spacing-xl) 0; }

/* Utility */
.text-center { text-align: center; }
.text-gold { color: var(--color-accent); }
.serif-italic { font-family: var(--font-heading); font-style: italic; }

/* Minimalist Button */
.btn-premium {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--color-text-primary);
    color: white !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    cursor: pointer;
}

.btn-premium:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(184, 155, 94, 0.2);
}
/* Reveal System */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.is-inview {
    opacity: 1;
    transform: translateY(0);
}

/* --- Bento Grid Layout --- */
.grid-bento {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.bento-item {
    background: var(--color-surface);
    padding: 3rem;
    border: 1px solid var(--color-border);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.bento-main {
    grid-row: span 2;
    background: linear-gradient(to bottom right, #ffffff, #fcfcfc);
}

.bento-item:hover {
    transform: translateY(-8px);
    border-color: rgba(184, 155, 94, 0.3);
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.04);
    z-index: 10;
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: var(--color-accent);
    transition: height 0.4s ease;
}

.bento-item:hover::before {
    height: 100%;
}

.bento-item h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 2rem; line-height: 1.2; }
.bento-item h3 { margin-bottom: 1rem; color: var(--color-accent); font-weight: 600; font-size: 0.75rem; letter-spacing: 3px; }
.bento-item p { color: var(--color-text-secondary); line-height: 1.7; font-size: 0.95rem; }

@media (max-width: 992px) {
    .grid-bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento-main {
        grid-row: span 1;
    }
}

/* --- WooCommerce Global Styles (Pure UI) --- */

.woocommerce-cart-form, .woocommerce-checkout {
    padding: var(--spacing-xl) 0;
}

table.shop_table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-border);
    margin-bottom: 3rem;
}

table.shop_table th {
    padding: 1.5rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    background: #f8f9fa;
    text-align: left;
}

table.shop_table td {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-subtotal, .order-total {
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

.amount { color: var(--color-accent); font-weight: 600; }

/* Forms & Inputs */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background: #fdfdfd;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

input:focus {
    border-color: var(--color-accent);
    outline: none;
}

.form-row label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Tabs and Toggles */
.woocommerce-tabs ul.tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--color-border);
}

.woocommerce-tabs ul.tabs li {
    padding: 1rem 3rem;
    font-family: var(--font-heading);
    cursor: pointer;
}

.woocommerce-tabs ul.tabs li.active {
    border-bottom: 2px solid var(--color-accent);
}

/* --- Video Gallery Elite --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.video-card {
    background: white;
    border: 1px solid var(--color-border);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.video-thumbnail-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-card-content {
    padding: 2rem;
    flex-grow: 1;
}

.video-card-number {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.video-card h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.video-card p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

.video-hero-container {
    background: #0f172a;
    padding: 8rem 0;
    color: white;
}

.video-hero-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .video-hero-container { padding: 4rem 0; }
    .video-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Footer Institucional V2 --- */
.site-footer-v2 {
    background: #0a0f1d;
    color: #94a3b8;
    padding: 8rem 0 0 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-v2-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 6rem;
}

.footer-v2-col h4 {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    font-weight: 700;
}

.footer-v2-about .logo-link {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-v2-links {
    list-style: none;
    padding: 0;
}

.footer-v2-links li {
    margin-bottom: 1rem;
}

.footer-v2-links a {
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.footer-v2-legal-bar {
    background: #070b16;
    padding: 4rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.legal-text-block {
    font-size: 0.75rem;
    line-height: 1.8;
    color: #475569;
    max-width: 100%;
}

.legal-section-title {
    color: #64748b;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Logos de terceros: se muestran sin alterar y con 18px de espacio libre
   alrededor, segun las NinjaTrader Vendor Professional and Compliance Guidelines. */
.footer-v2-partners {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}

.footer-v2-partners img {
    /* content-box: el reset global es border-box y el padding de 18px
       colapsaria la altura del logo. */
    box-sizing: content-box;
    height: 26px;
    width: auto;
    padding: 18px;
}

/* --- AYG Gallery Skin (Plugin Compatibility) --- */
.ayg-gallery-wrapper {
    margin-top: 4rem;
}

.ayg-video-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 2rem !important;
}

.ayg-video-item {
    background: transparent !important;
    border: none !important;
    transition: transform 0.4s ease !important;
    cursor: pointer;
}

.ayg-video-item:hover {
    transform: scale(1.02);
}

.ayg-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255,255,255,0.05);
}

.ayg-thumbnail-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ayg-video-item:hover .ayg-thumbnail-wrapper::after {
    opacity: 1;
}

.ayg-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.ayg-video-item:hover .ayg-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ayg-video-info {
    padding: 1.5rem 0;
}

.ayg-video-title {
    font-family: var(--font-heading) !important;
    font-size: 1.1rem !important;
    color: var(--color-text-primary) !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.4 !important;
}

.ayg-video-meta {
    font-size: 0.75rem !important;
    color: var(--color-text-secondary) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

@media (max-width: 1024px) {
    .footer-v2-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .footer-v2-grid { grid-template-columns: 1fr; }
}

/* --- Elite Newsletter Section (Quiet Luxury) --- */
.newsletter-section-premium {
    position: relative;
    padding: 12rem 0;
    background: #0f172a; /* Deep Navy base */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.newsletter-bg-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    filter: brightness(0.6) contrast(1.2);
    z-index: 1;
}

.newsletter-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent, #0f172a 80%);
    z-index: 2;
}

.newsletter-glass-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5rem 4rem;
    max-width: 700px;
    width: 100%;
    text-align: center;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.5);
}

.newsletter-glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(184, 155, 94, 0.3), transparent, rgba(184, 155, 94, 0.3)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
}

.newsletter-glass-card h2 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.newsletter-glass-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 3.5rem;
}

.premium-input-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.premium-input-wrapper input {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 1.5rem 0.5rem !important;
    font-size: 1.2rem !important;
    text-align: center !important;
    transition: all 0.4s ease !important;
    width: 100% !important;
}

.premium-input-wrapper input:focus {
    border-bottom-color: var(--color-accent) !important;
    box-shadow: none !important;
}

.premium-input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateX(-50%);
}

.premium-input-wrapper input:focus + .premium-input-line {
    width: 100%;
}

.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: none;
    animation: shimmer 5s infinite;
}

@keyframes shimmer {
    0% { left: -60%; }
    20% { left: 140%; }
    100% { left: 140%; }
}


/* --- Boutique Engineering Section (Split-Layout) --- */
.engineering-boutique-section {
    padding: var(--spacing-xl) 0;
    background: #ffffff;
    border-top: 1px solid var(--color-border);
}

.engineering-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.engineering-content h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: var(--font-heading-tight);
    margin-bottom: 2.5rem;
}

.engineering-features {
    list-style: none;
    padding: 0;
}

.engineering-features li {
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 2rem;
}

.engineering-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8rem;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
}

.engineering-features h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
    font-weight: 700;
}

.engineering-features p {
    font-size: 0.95rem;
    opacity: 0.7;
    margin: 0;
}

.engineering-visual {
    background: #0f172a;
    padding: 3rem;
    border: 1px solid rgba(184, 155, 94, 0.2);
    box-shadow: 0 40px 80px rgba(15, 23, 42, 0.1);
    position: relative;
    overflow: hidden;
}

.code-mockup-label {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-body);
}

pre.code-snippet {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
}

pre .keyword { color: #818cf8; }
pre .class { color: #fbbf24; }
pre .comment { color: #64748b; font-style: italic; }

@media (max-width: 992px) {
    .engineering-grid { grid-template-columns: 1fr; gap: 4rem; }
}

/* --- Final Newsletter Design (Editorial) --- */
.newsletter-section-boutique {
    padding: var(--spacing-xl) 0;
    background: #0f172a;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-content-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.newsletter-section-boutique h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: white;
    margin-bottom: 2rem;
}

.newsletter-section-boutique p {
    font-size: 1.1rem;
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto 4rem;
    line-height: 1.8;
}

.boutique-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.boutique-input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.5rem !important;
    text-align: center !important;
    font-size: 1.1rem !important;
    color: white !important;
    margin-bottom: 3rem !important;
    transition: all 0.4s ease !important;
}

.boutique-input:focus {
    border-bottom-color: var(--color-accent) !important;
    outline: none !important;
}

.btn-boutique {
    background: var(--color-accent);
    color: white !important;
    padding: 1.2rem 4rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-boutique:hover {
    letter-spacing: 6px;
    background: #d4b572;
    transform: translateY(-2px);
}


.premium-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.premium-popup-box {
    background: #ffffff;
    border: 1px solid var(--color-border);
    max-width: 500px;
    width: 90%;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 50px 100px -20px rgba(15, 23, 42, 0.25);
}

.premium-popup-overlay.active .premium-popup-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.premium-popup-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.premium-popup-close:hover {
    color: var(--color-text-primary);
}

.premium-popup-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
}

/* =========================================================
   MOBILE RESPONSIVE SYSTEM
   ========================================================= */

/* --- Hamburger Toggle Button --- */
.mobile-menu-toggle {
    display: none; /* hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all 0.35s cubic-bezier(0.77, 0, 0.175, 1);
    border-radius: 2px;
}

.mobile-menu-toggle .bar:nth-child(1) { margin-bottom: 5px; }
.mobile-menu-toggle .bar:nth-child(2) { margin-bottom: 5px; }

/* Animated X when active */
.mobile-menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* White bars on transparent/dark headers - Removed because mix-blend-mode handles it smartly */
/* header:not(.scrolled) .mobile-menu-toggle .bar { background: #ffffff; } */

/* Body scroll lock when menu open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

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

/* --- Hamburger nav: activa drawer a ≤1200px (cubre todos los viewports con overflow) --- */
@media (max-width: 1200px) {

    /* Mostrar hamburger, ocultar nav desktop y botón Área Cliente */
    .mobile-menu-toggle {
        display: flex;
    }

    .header-actions {
        display: none;
    }

    /* --- Mobile Drawer (fullscreen overlay) --- */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(15, 23, 42, 0.97);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                    visibility 0.4s,
                    transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .nav-links.mobile-open {
        display: flex !important;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Ajuste del header */
    header {
        height: 70px;
    }

    header.scrolled {
        height: 70px;
    }

    .header-container {
        padding: 0 2rem;
    }

    .logo-link {
        font-size: 1.2rem;
    }

    .nav-links a {
        color: #ffffff !important;
        font-size: 1.1rem;
        letter-spacing: 0.2em;
        opacity: 0.7;
        padding: 1.2rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        transition: opacity 0.3s ease, color 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
        opacity: 1;
        color: var(--color-accent) !important;
    }

    .nav-links a::after {
        display: none;
    }

    .mobile-menu-toggle.is-active .bar {
        background: #ffffff;
    }
}

/* --- Mobile pequeño (≤768px): reducir header y ajustes de layout --- */
@media (max-width: 768px) {

    /* --- GLOBAL INLINE STYLE OVERRIDES FOR MOBILE --- */
    [style*="font-size: 3"] { font-size: 2rem !important; line-height: 1.2 !important; }
    [style*="font-size: 2.5"] { font-size: 1.8rem !important; line-height: 1.2 !important; }
    [style*="padding: 10rem"] { padding: 4rem 0 !important; }
    [style*="padding: 8rem"] { padding: 3rem 0 !important; }
    [style*="margin-top: -3rem"] { margin-top: 0 !important; }
    [style*="gap: 4rem"] { gap: 2rem !important; }

    /* Header más compacto en móvil */
    header {
        height: 60px !important;
    }

    header.scrolled {
        height: 60px;
    }

    .header-container {
        padding: 0 1.5rem;
    }

    .logo-link {
        font-size: 1.1rem;
    }

    /* --- Hero Section Mobile --- */
    .hero-section-elite {
        height: 85vh;
        padding: 0 1rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem) !important;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-actions .btn-premium {
        padding: 1rem 2rem;
        font-size: 0.75rem;
    }

    /* --- Section Padding Mobile --- */
    section {
        padding: clamp(3rem, 10vw, 6rem) 0;
    }

    .container {
        padding: 0 1.25rem;
    }

    /* --- Vision Section Mobile --- */
    .vision-section .hero-title,
    .vision-section h2 {
        font-size: 2rem !important;
    }

    .vision-section p {
        font-size: 1rem !important;
    }

    /* --- Methodology Grid Mobile --- */
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    /* --- Engineering Boutique Mobile --- */
    .engineering-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .engineering-content h2 {
        font-size: 2rem;
    }

    .engineering-visual {
        padding: 2rem;
    }

    pre.code-snippet {
        font-size: 0.7rem;
        overflow-x: auto;
    }

    /* --- Newsletter Mobile --- */
    .newsletter-section-boutique {
        padding: 5rem 0;
    }

    .newsletter-section-boutique h2 {
        font-size: 2rem;
    }

    .boutique-form-wrapper {
        padding: 0 1rem;
    }

    .btn-boutique {
        padding: 1rem 2.5rem;
        letter-spacing: 2px;
    }

    /* --- CTA Elite Mobile --- */
    .cta-elite h2 {
        font-size: 2rem !important;
    }

    .cta-elite p {
        font-size: 0.95rem !important;
    }

    /* --- Testimonial Mobile --- */
    .testimonial-section p.serif-italic {
        font-size: 1.15rem !important;
        padding: 0 1rem;
    }

    /* --- Footer Mobile --- */
    .site-footer-v2 {
        padding: 4rem 0 0 0;
    }

    .footer-v2-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-bottom: 3rem;
    }

    .footer-v2-partners {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    /* --- Legal Bar Mobile --- */
    .footer-v2-legal-bar .container > div[style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }

    .footer-v2-legal-bar .legal-text-block {
        margin-bottom: 2rem;
    }

    .footer-v2-legal-bar {
        padding: 2.5rem 0;
    }

    /* --- Popup Mobile --- */
    .premium-popup-box {
        width: 95%;
        padding: 2.5rem 1.5rem;
    }

    .premium-popup-box h2 {
        font-size: 1.6rem !important;
    }

    /* --- Bento Grid Mobile (override) --- */
    .grid-bento {
        grid-template-columns: 1fr;
    }

    .bento-item {
        padding: 2rem;
    }

    .bento-item h2 {
        font-size: 1.6rem;
    }

    /* --- Blog Grid Mobile --- */
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem 0 !important;
    }

    /* --- Shop Grid Mobile --- */
    .product-grid {
        grid-template-columns: 1fr !important;
    }

    .shop-header-elite {
        padding: 8rem 0 3rem !important;
    }

    /* --- Contact Grid Mobile --- */
    .contact-hero {
        height: 50vh !important;
    }

    .contact-hero .hero-title {
        font-size: 2rem !important;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
        margin-top: -3rem !important;
    }

    /* --- Video Tutorials Mobile --- */
    .video-hero-container {
        padding: 80px 0 40px 0 !important;
    }

    .video-hero-container h1 {
        font-size: 1.5rem !important;
    }

    /* --- Custom Cursor: disable on touch --- */
    .custom-cursor {
        display: none !important;
    }

    /* Disable cursor:none on touch */
    * { cursor: auto !important; }
}

/* --- Small phones (≤400px) --- */
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.8rem !important;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 1rem 0;
    }

    .bento-item h2 {
        font-size: 1.4rem;
    }

    .engineering-content h2 {
        font-size: 1.7rem;
    }

    .newsletter-section-boutique h2 {
        font-size: 1.6rem;
    }
}

