/*
    CSS for arewa.ai landing page
    Dark theme with purple/blue titles and white text
*/

/* --- Añadir al inicio de style.css --- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');

:root {
    /* Colors */
    --bg-color: #050505;
    --bg-card: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --accent-color: #8b5cf6;
    /* Updated to a more vibrant/neon purple */
    --accent-glow: rgba(139, 92, 246, 0.5);
    --border-color: #262626;

    /* Fonts */
    --font-heading: 'JetBrains Mono', monospace;
    --font-mono: 'Source Code Pro', monospace;
}

/* --- Global Styles --- */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Navigation --- */
.navbar {
    /* Navbar color */
    background-color: rgba(5, 5, 5, 0.7);

    /* 2. El efecto "vidrio esmerilado" */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;

    /* 3. Borde sutil */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    /* 4. Una transición suave por si cambia en el futuro */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.logo {
    height: 40px;
    /* Adjust height as needed */
    width: auto;
    margin: 0;
    display: block;
}

.nav-links {
    flex-wrap: wrap;
    justify-content: center;
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    /* Default text color */
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    display: inline-block;

    /* 1. Añadimos padding para crear una "cápsula" */
    padding: 0.5rem 1rem;
    border-radius: 6px;

    /* 2. Transición a "all" para incluir el fondo */
    transition: all 0.2s ease;

    /* Tamaño de Fuente */
    font-size: 14px;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-links .nav-cta {
    padding: 0;
}

/* Language Toggle Button */
.nav-btn-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 38px;
    /* Match approximately the height of other links/buttons */
}

.nav-btn-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.nav-btn-toggle .lang-text {
    position: relative;
    top: 1px;
}

/* --- Hamburger Menu --- */
.hamburger {
    display: none;
    /* Hidden by default on desktop */
    padding: 15px;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    z-index: 1001;
    /* Above navbar content */
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 30px;
    height: 3px;
    background-color: #e6edf3;
    border-radius: 4px;
    position: absolute;
    transition: transform 0.25s ease-in-out;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    display: block;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* --- Sections --- */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    background-color: transparent;
    background-image: url('assets/hero_bg.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
    border-bottom: 1px solid #770aadff;
}

/* Add an overlay to ensure text readability on the image */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.7), rgba(5, 5, 5, 1));
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.section {
    padding: 40px 0;
    border-bottom: 1px solid #770aadff;
}

.section:last-child {
    border-bottom: none;
}

/* --- Headings --- */
h1,
h2,
h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    /* Tighter tracking for modern look */
}

h1 {
    font-size: 4rem;
    /* Massive heading */
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #a3a3a3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* --- Paragraphs --- */
p {
    margin-bottom: 1.5rem;
    color: #e6edf3;
    /* Text color for better readability */
}

/* --- Links --- */
a {
    color: #b145c4;
    /* Primary color for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #e6edf3;
    /* Text color on hover */
}

/* --- Buttons --- */
/* --- Buttons --- */
.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.2s ease;
    margin-top: 2rem;
    border: 1px solid transparent;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
    /* Glow effect */
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
    background: #7c3aed;
    /* Slightly darker purple on hover */
}

/* --- Services Grid --- */
/* Target specific intro paragraph in services */
#servicios>.container>p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.service-item {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-item h3 {
    color: var(--text-primary);
    margin-top: 0;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.service-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.7;
}

.service-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.1);
}

/* --- Comparison Section --- */
.comparison-section {
    margin: 6rem 0;
    text-align: center;
}

.comparison-table {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1px;
    background: var(--border-color);
    /* Lines between cells */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin: 3rem auto;
    max-width: 1000px;
}

.comparison-row {
    display: contents;
}

.comparison-row.header .comparison-cell {
    background: #0f0f0f;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1.5rem 1rem;
}

.comparison-cell {
    background: var(--bg-card);
    padding: 1.5rem 1rem;
    text-align: left;
    vertical-align: middle;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.comparison-cell:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* Center icons in data cells */
.comparison-cell:not(:first-child) {
    justify-content: center;
    /* Center content horizontally */
}

.comparison-cell:not(:first-child) span {
    /* Ensure text/icon wrapper is centered */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Icon Styles --- */
.icon-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.icon-yes {
    color: #4ade80;
    /* Brighter green */
}

.icon-no {
    color: #f87171;
    /* Softer red */
}

.icon-warn {
    color: #fbbf24;
    /* Brighter amber */
}

/* --- Benefits List --- */
/* Target specific intro paragraph in benefits */
#beneficios>.container>p {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    margin-bottom: 3rem;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.benefit-item {
    text-align: center;
    padding: 1rem;
}

.benefit-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.benefit-item p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* --- Nosotros Section --- */
#nosotros {
    background-image: url('assets/hero_infra_gemini.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding: 100px 0;
    border-bottom: none;
}

#nosotros::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.8), rgba(5, 5, 5, 1));
    z-index: 0;
    pointer-events: none;
}

#nosotros .container {
    position: relative;
    z-index: 1;
}

/* --- Contact Section --- */
#contacto {
    background-image: url('assets/hero_bg.png');
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    position: relative;
    text-align: center;
    /* Ensures content is centered */
}

#contacto p {
    max-width: 600px;
    /* "Techo" seguro para pantallas grandes */
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    /* Centrado como solicitaste */
}

#contacto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 1), rgba(5, 5, 5, 0.7));
    z-index: 0;
    pointer-events: none;
}

#contacto .container {
    position: relative;
    z-index: 1;
}

/* --- Contact Form --- */
.contact-form {
    max-width: 500px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #770aadff;
    border-radius: 8px;
    background: #262730;
    color: #e6edf3;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #770aadff;
}

.contact-form button {
    background: #770aadff;
    color: #e6edf3;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.contact-form button:hover {
    transform: translateY(-2px);
}

/* --- Code Examples --- */
.code-examples {
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.code-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #770aadff;
}

.tab-button {
    background: none;
    border: none;
    color: #e6edf3;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #770aadff;
}

.tab-button.active {
    color: #770aadff;
    border-bottom-color: #770aadff;
}

.code-content {
    position: relative;
}

.code-block {
    display: none;
    background: #0a0a0a;
    border: 1px solid #770aadff;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    text-align: left;
}

.code-block.active {
    display: block;
}

.code-block pre {
    margin: 0;
    white-space: pre;
    word-wrap: break-word;
    tab-size: 2;
    -moz-tab-size: 2;
}

.code-block code {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #e6edf3;
}

/* --- Footer --- */
.footer {
    background: #0a0a0a;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #770aadff;
}

.footer p {
    margin: 0;
    color: #e6edf3;
}

/* --- Documentation Page --- */
.docs-layout.container {
    display: flex;
    gap: 2rem;
    padding-top: 80px;
    padding-bottom: 80px;
}

.docs-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    /* 80px (navbar) + 20px (gap) = 100px */
    top: 100px;
    /* Adjust height to account for navbar */
    height: calc(100vh - 120px);
    overflow-y: auto;
    /* For many links */
}

.docs-content {
    flex-grow: 1;
    min-width: 0;
    /* Prevents flexbox overflow */
}

.docs-sidebar .sidebar-nav h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    /* A muted text color for the dark bg */
    color: #999;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    /* Override h3 default */
    text-align: left;
}

.docs-sidebar .sidebar-nav h3:first-child {
    margin-top: 0;
}

.docs-sidebar .sidebar-nav a {
    display: block;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
    border-radius: 6px;
    /* Match your nav-links */
    color: #e6edf3;
    text-decoration: none;
    transition: all 0.3s ease;
}

.docs-sidebar .sidebar-nav a:hover {
    /* Use your secondary bg color */
    background-color: #262730;
    color: #e6edf3;
}

.docs-sidebar .sidebar-nav a.active {
    background-color: #262730;
    /* Use your primary color */
    color: #770aadff;
    font-weight: 700;
}

/* --- Doc Content Overrides --- */
.docs-content h1,
.docs-content h2 {
    /* Override centered headings */
    text-align: left;
    /* Add a nice separator */
    border-bottom: 1px solid #770aadff;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

/* Basic styling for the <ol> */
.docs-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.docs-content ol li {
    padding-left: 0.5rem;
    margin-bottom: 1rem;
}

/* Style the <hr> from the HTML */
.docs-content hr {
    border: 0;
    border-top: 1px solid #770aadff;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* --- Copy button --- */
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #555;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.7;
}

.copy-button:hover {
    opacity: 1;
}

.code-block-wrapper {
    position: relative;
}

.icon-heart {
    display: inline-block;
    /* Para que se comporte como texto */
    width: 1em;
    /* Se ajusta al tamaño de la fuente */
    height: 1em;
    /* Se ajusta al tamaño de la fuente */
    color: #971bd9;
    /* Un color rojo bonito */
    position: relative;
    /* Para ajustar la alineación */
    top: 0.125em;
    /* Lo alinea verticalmente con el texto */
}


/* =========================================================
=================== MEDIA QUERIES (FIXED) ===============
=========================================================
*/
@media (max-width: 768px) {
    .hamburger {
        display: inline-block;
        /* Show hamburger on mobile */
    }

    /* Transition for when menu is open */
    .hamburger[aria-expanded="true"] .hamburger-inner {
        transform: rotate(45deg);
    }

    .hamburger[aria-expanded="true"] .hamburger-inner::before {
        transform: rotate(-90deg) translate(-10px, 0px);
        opacity: 0;
    }

    .hamburger[aria-expanded="true"] .hamburger-inner::after {
        transform: rotate(-90deg) translate(10px, 0px);
    }

    .hamburger-inner::before {
        top: -10px;
    }

    .hamburger-inner::after {
        bottom: -10px;
    }

    .navbar .container {
        flex-direction: row;
    }

    .nav-links {
        /* Hide menu off-screen */
        position: fixed;
        top: 0;
        left: -100%;
        width: 50%;
        max-width: 300px;
        height: 100vh;

        /* 1. Usamos RGBA (transparencia del 98%) */
        background-color: rgba(27, 29, 31, 0.98);

        /* 2. El efecto "vidrio esmerilado" */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);

        /* 3. Un borde en el lateral (en lugar de abajo) */
        border-right: 1px solid rgba(119, 10, 173, 0.25);
        /* --- Fin de la solución --- */

        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease-in-out;
    }

    .hero {
        padding: 90px 0 60px;
        /* Reduced top padding for mobile view */
    }

    .nav-links.active {
        left: 0;
        box-shadow: 5px 0px 15px rgba(0, 0, 0, 0.2);
    }

    .section {
        padding: 20px 0;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .services-grid,
    .benefits-list {
        grid-template-columns: 1fr;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .code-tabs {
        flex-direction: column;
        align-items: center;
    }

    .code-block {
        font-size: 0.75rem;
    }

    /* --- Responsive Comparison Table Cards --- */
    .comparison-table {
        display: block;
        /* Override desktop's grid */
        max-width: 100%;
        border: none;
        background: none;
        gap: 0;
    }

    /* 1. Hide the desktop header row */
    .comparison-row.header {
        display: none;
    }

    /* 2. Each row becomes a separate "card" */
    .comparison-row {
        display: block;
        /* CRITICAL: Overrides 'display: contents' */
        border: 1px solid #770aadff;
        border-radius: 12px;
        margin-bottom: 20px;
        /* Space between cards */
        overflow: hidden;
        /* For card border-radius */
        background: #262730;
        /* Your bg color */
    }

    /* 3. Style the feature cell as the card header */
    .comparison-cell.feature {
        display: block;
        background-color: #770aadff;
        /* Your accent color */
        color: #e6edf3;
        font-weight: bold;
        font-size: 1.1em;
        text-align: center;
        /* Center the card header */
        padding: 1rem;
        border: none;
        /* Remove desktop border */
    }

    /* 4. Style the data cells */
    .comparison-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border: none;
        /* Remove desktop border */
        border-bottom: 1px solid #444;
        /* Separator line inside card */
        text-align: right;
    }

    .comparison-row .comparison-cell:last-child {
        border-bottom: none;
        /* No line after the last item in a card */
    }

    /* 5. The magic: Use the HTML data-label */
    .comparison-cell::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        padding-right: 15px;
        color: #e6edf3;
        /* Your text color */
    }

    /* The feature cell doesn't need a label */
    .comparison-cell.feature::before {
        content: none;
    }

    /* 1. Apila el layout verticalmente */
    .docs-layout.container {
        flex-direction: column;
        padding-top: 80px;
    }

    /* 2. Convierte el sidebar de escritorio en un bloque normal */
    .docs-sidebar {
        position: static;
        width: 100%;
        height: auto;
        overflow-y: visible;
        border-bottom: 1px solid #770aadff;
        padding-bottom: 1rem;
        margin-bottom: 0;
        background-color: transparent;
        padding-top: 40px;
    }

    /* 3. Nos aseguramos de que el botón de hamburguesa viejo no aparezca */
    .docs-sidebar .hamburger {
        display: none;
    }

    /* 4. Estilos para el menú de navegación del sidebar en móvil */
    .docs-sidebar .sidebar-nav {
        display: block;
        position: static !important;
        margin-top: 0;
        padding: 0;
        background-color: transparent;
        border: none;
        border-radius: 0;
    }

    .docs-content section,
    .docs-content h1 {
        margin-top: 0;
    }

    .docs-content hr {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .docs-content section {
        margin-top: 0;
    }

    .docs-content {
        padding-top: 1px;
    }
}