/* ==========================================================================
   FREDIANI - Realismo 3.0 & Metal Sobrio (Standard CSS - 100% Universal Compatibility)
   Constructores de Autos de Competición & Ingeniería Automotriz
   ========================================================================== */

/* Design Tokens & CSS Variables */
:root {
    --bg-black: #000000;
    --bg-titanium-subtle: linear-gradient(180deg, #000000 0%, #07090d 50%, #000000 100%);
    --bg-title-banner: linear-gradient(90deg, rgba(0, 176, 255, 0.08) 0%, rgba(18, 22, 30, 0.6) 40%, transparent 100%);
    
    --border-metal-subtle: rgba(255, 255, 255, 0.1);
    --border-metal-bright: rgba(255, 255, 255, 0.28);
    --border-metal-glow: rgba(0, 176, 255, 0.45);
    
    --color-white: #ffffff;
    --color-gray-light: #e2e8f0;
    --color-gray-muted: #94a3b8;
    --color-cyan-accent: #00b0ff;
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition-fast: 0.25s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-black);
    color: var(--color-white);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Nuclear Mobile & Desktop CSS override to annihilate Netlify drawer/badge */
[data-netlify-badge],
.netlify-badge,
iframe[src*="netlify"],
#netlify-modal-overlay,
div[class*="netlify"],
div[id*="netlify"],
#netlify-drawer-root,
net-drawer,
div[data-netlify-drawer],
button[aria-label*="Netlify"],
[data-test-id*="netlify"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    transform: scale(0) !important;
    z-index: -99999 !important;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-cyan { color: var(--color-cyan-accent); }
.text-muted { color: var(--color-gray-muted); }
.text-center { text-align: center; }

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

/* Floating Scroll-Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(65px) scale(0.97);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* High-Contrast Metallic Divider Line */
.metallic-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 176, 255, 0.5) 25%, rgba(255, 255, 255, 0.4) 50%, rgba(0, 176, 255, 0.5) 75%, transparent 100%);
    margin: 4.5rem 0;
    box-shadow: 0 0 15px rgba(0, 176, 255, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid transparent;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.btn-single-line {
    white-space: nowrap !important;
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #d8e1e8 100%);
    color: #000000;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-cyan-accent) 0%, #0088cc 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 176, 255, 0.35);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    border-color: var(--border-metal-bright);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.4rem;
    font-size: 1.05rem;
}

.btn-yt {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-yt:hover {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.45);
    transform: translateY(-2px);
}

/* Splash Screen GIF Overlay */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.splash-gif {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
}

/* Header Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-metal-subtle);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 105px;
}

.brand-logo-wrap {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.brand-logo-img {
    height: 78px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-gray-muted);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
}

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

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

.nav-store-highlight {
    background: linear-gradient(135deg, rgba(0, 176, 255, 0.18) 0%, rgba(0, 120, 215, 0.1) 100%);
    color: var(--color-cyan-accent);
    padding: 0.5rem 1.2rem !important;
    border-radius: 20px;
    border: 1px solid var(--border-metal-glow);
    box-shadow: 0 4px 15px rgba(0, 176, 255, 0.15);
}

.nav-store-highlight:hover {
    background: var(--color-cyan-accent);
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 176, 255, 0.4);
}

.nav-store-highlight::after {
    display: none !important;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.carousel-section {
    padding: 1.5rem 0;
    background: #000000;
    min-height: calc(100vh - 105px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-metal-subtle);
}

.carousel-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 620px;
    max-height: calc(100vh - 160px);
    width: 100%;
    border: 1px solid var(--border-metal-bright);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95);
}

.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel Caption (COMPLETELY HIDDEN PER USER DIRECTIVE) */
.slide-caption {
    display: none !important;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border: 1px solid var(--border-metal-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.carousel-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.prev-btn { left: 1.5rem; }
.next-btn { right: 1.5rem; }

.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    right: 2.5rem;
    display: flex;
    gap: 0.6rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: var(--transition-fast);
}

.dot:hover { background: rgba(255, 255, 255, 0.7); }
.dot.active {
    background: #ffffff;
    width: 30px;
    border-radius: 10px;
}

/* Sections Global */
.section {
    padding: 7rem 0;
    background: #000000;
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 3.2rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-cyan-accent);
    margin-top: 0.8rem;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(0, 176, 255, 0.6);
}

/* Open Text Box */
.sober-text-box {
    background: transparent;
    border: none;
    border-left: 4px solid var(--color-cyan-accent);
    padding: 0.6rem 0 0.6rem 2.2rem;
    font-size: 1.18rem;
    color: var(--color-gray-light);
    line-height: 1.9;
}

/* Section 1: Quiénes Somos */
.quienes-somos-section {
    background: #000000;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.team-card {
    background: transparent;
    border: none;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-normal);
}

.team-card:hover {
    transform: translateY(-6px);
}

.team-avatar-wrap {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.team-avatar {
    width: 145px;
    height: 145px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-metal-bright);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.9);
    transition: var(--transition-normal);
}

.team-card:hover .team-avatar {
    border-color: var(--color-cyan-accent);
    transform: scale(1.06);
}

.team-name {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.team-role {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-cyan-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.team-bio {
    font-size: 0.95rem;
    color: var(--color-gray-muted);
    line-height: 1.65;
}

/* Section 2: Qué Hacemos */
.que-hacemos-section {
    background: var(--bg-titanium-subtle);
    border-top: 1px solid var(--border-metal-subtle);
    border-bottom: 1px solid var(--border-metal-subtle);
}

.slogan-badge {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.6rem 1.6rem;
    background: rgba(0, 176, 255, 0.1);
    border: 1px solid var(--border-metal-glow);
    border-radius: 30px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--color-cyan-accent);
    letter-spacing: 0.04em;
    box-shadow: 0 0 20px rgba(0, 176, 255, 0.15);
}

/* Section 3: Nuestras Áreas */
.nuestras-areas-section {
    background: #000000;
}

.areas-stacked-list {
    display: flex;
    flex-direction: column;
}

.area-row {
    background: transparent;
    border: none;
    padding: 2rem 0;
    transition: var(--transition-normal);
}

.area-row-header {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-title-banner);
    border-left: 4px solid var(--color-cyan-accent);
    border-radius: 8px;
}

.area-badge {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 176, 255, 0.18) 0%, rgba(20, 26, 36, 0.9) 100%);
    border: 1px solid var(--border-metal-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--color-cyan-accent);
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 176, 255, 0.2);
}

.area-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.04em;
    font-family: var(--font-heading);
}

.area-desc {
    font-size: 1.1rem;
    color: var(--color-gray-light);
    line-height: 1.85;
    margin-bottom: 1.6rem;
    max-width: 980px;
    padding-left: 0.5rem;
}

.area-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    padding-left: 0.5rem;
}

.pill {
    padding: 0.45rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-metal-bright);
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-gray-muted);
}

/* Featured Project: Roadbook */
.featured-project-box {
    background: rgba(0, 176, 255, 0.04);
    border-left: 3px solid var(--color-cyan-accent);
    border-radius: 8px;
    padding: 1.2rem 1.8rem;
    margin-top: 1.2rem;
    margin-bottom: 1.4rem;
    margin-left: 0.5rem;
}

.fp-badge {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--color-cyan-accent);
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.fp-title {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.fp-desc {
    font-size: 0.98rem;
    color: var(--color-gray-light);
}

.yt-cta-wrap {
    margin-top: 1.6rem;
    padding-left: 0.5rem;
}

/* Marketplace & Contact Banners */
.marketplace-section {
    background: #000000;
    padding: 5rem 0 7rem 0;
}

.marketplace-banner-card {
    background: transparent;
    border-top: 1px solid var(--border-metal-subtle);
    border-bottom: 1px solid var(--border-metal-subtle);
    padding: 3.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.mp-banner-content {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.mp-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(0, 176, 255, 0.12);
    border: 1px solid var(--color-cyan-accent);
    color: var(--color-cyan-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    flex-shrink: 0;
}

.mp-title {
    font-size: 1.55rem;
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.mp-desc {
    color: var(--color-gray-muted);
    font-size: 1rem;
}

.contact-banner-info {
    font-size: 1.05rem;
    color: var(--color-gray-light);
}

.inline-link {
    color: #ffffff;
    text-decoration: underline;
}

.inline-link:hover {
    color: var(--color-cyan-accent);
}

/* Minimal Footer */
.footer-minimal {
    background: #000000;
    border-top: 1px solid var(--border-metal-subtle);
    padding: 2.5rem 0;
    font-size: 0.88rem;
    color: var(--color-gray-muted);
}

.admin-trigger-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-metal-subtle);
    color: var(--color-gray-muted);
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.admin-trigger-btn:hover {
    color: #ffffff;
    border-color: #ffffff;
}

/* Admin Assistant Modal */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(16px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.admin-modal-overlay.active {
    display: flex;
}

.admin-modal {
    background: #11141a;
    border: 1px solid var(--border-metal-bright);
    border-radius: 16px;
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.95);
}

.admin-modal-header {
    background: #000000;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-metal-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-modal-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

.admin-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-metal-subtle);
    margin-bottom: 2rem;
}

.admin-tab {
    padding: 0.6rem 1.2rem;
    background: none;
    border: none;
    color: var(--color-gray-muted);
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.admin-tab.active {
    color: #ffffff;
    border-bottom-color: var(--color-cyan-accent);
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

.admin-form-group {
    margin-bottom: 1.2rem;
}

.admin-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    color: #dddddd;
}

.admin-input, .admin-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #1a1e26;
    border: 1px solid var(--border-metal-subtle);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
}

.admin-input:focus, .admin-textarea:focus {
    outline: none;
    border-color: var(--color-cyan-accent);
}

.admin-textarea {
    min-height: 90px;
    resize: vertical;
}

.admin-actions-bar {
    background: #000000;
    padding: 1.2rem 2rem;
    border-top: 1px solid var(--border-metal-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .carousel-wrapper { height: 380px; }
    .team-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 2.5rem; }
    .area-title { font-size: 1.7rem; }
    .marketplace-banner-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .carousel-wrapper { height: 280px; }

    .nav-menu {
        position: fixed;
        top: 105px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 105px);
        background: #000000;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition-normal);
    }

    .nav-menu.active { left: 0; }
    .mobile-toggle { display: block; }
}
