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

/* --- Global Styles --- */
body {
    background-color: #0e1117; 
    color: #e6edf3; 
    font-family: 'Source Code Pro', 'Courier New', monospace; 
    font-size: 16px;
    line-height: 1.6;
    margin: 0; /* <-- KEEP this one */
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Navigation --- */
.navbar {
    background-color: #262730; /* Secondary background for sidebars */
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #5C3E94; /* muy parecido al de logo 450693*/
}

.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;
}

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

.nav-links a {
    color: #e6edf3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #5C3E94; /* Primary color on hover */
}

/* --- 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: 0 20px;
}

/* --- Sections --- */
.hero {
    padding: 70px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, #0e1117 0%, #262730 100%);
}

.section {
    padding: 80px 0;
    border-bottom: 1px solid #5C3E94;
}

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

/* --- Headings --- */
h1, h2, h3 {
    color: #e6edf3; /* Text color for titles */
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

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

h3 {
    font-size: 1.25rem;
    color: #5C3E94; /* Primary color for subheadings */
    text-align: center;
}

/* --- 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 --- */
.cta-button {
    display: inline-block;
    background: #5C3E94; /* Primary color for buttons */
    color: #e6edf3;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 2rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 125, 57, 0.3);
}

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

.service-item {
    background: #262730;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #5C3E94;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(52, 125, 57, 0.1);
}

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

.comparison-table {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1px;
    background: #5C3E94;
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem auto;
    max-width: 1000px;
}

.comparison-row {
    display: contents;
}

.comparison-row.header {
    background: #5C3E94;
}

.comparison-row.header .comparison-cell {
    background: #5C3E94;
    color: #e6edf3;
    font-weight: 700;
}

.comparison-cell {
    background: #262730;
    padding: 1rem;
    text-align: center;
    border: 1px solid #5C3E94;
}

.comparison-cell:first-child {
    text-align: left;
    font-weight: 600;
}

/* --- Benefits List --- */
.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-item {
    text-align: center;
}

/* --- 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 #5C3E94;
    border-radius: 8px;
    background: #262730;
    color: #e6edf3;
    font-family: inherit;
}

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

.contact-form button {
    background: #5C3E94;
    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 #5C3E94;
}

.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: #5C3E94;
}

.tab-button.active {
    color: #5C3E94;
    border-bottom-color: #5C3E94;
}

.code-content {
    position: relative;
}

.code-block {
    display: none;
    background: #262730;
    border: 1px solid #5C3E94;
    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;
}

.code-block.language-bash code {
    /* Bash/shell styling */
}

.code-block.language-python code {
    /* Python styling */
}

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

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

/* --- Media Queries --- */
@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: 60%;
        max-width: 300px;
        height: 100vh;
        background-color: #262730;
        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: 60px 0;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

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

    .container {
        padding: 0 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 #5C3E94;
        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: #5C3E94; /* 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;
    }
}