/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&family=Raleway:wght@400;600;700;800&display=swap');

:root {
    /* Brand Palette - Capitán Logo */
    --color-brand-orange: #ff6600;
    
    /* Dark/Neutral Tones */
    --color-brand-black: #101a1f;   /* New Deep Dark */
    --color-brand-dark: #202a30;    /* Base Dark */
    --color-brand-dark-2: #1a2228;  /* Darker Background */
    --color-brand-gray-dark: #3e3f42; 
    --color-brand-gray-mid: #4f5459;
    --color-brand-gray-light: #77828c;
    
    /* Teals / Blues */
    --color-brand-navy: #043345;
    --color-brand-navy-light: #344c61;
    --color-brand-teal: #2f8191;
    --color-brand-teal-light: #43aeba;
    
    --color-brand-text: #fcfcfc;    /* Off-white */

    /* Glassmorphism Tokens */
    --glass-bg: rgba(32, 42, 48, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: blur(20px);

    /* Deep Animated Background (Static fallback) */
    --bg-gradient: radial-gradient(circle at top center, rgba(47, 129, 145, 0.2), #202a30 60%);

    /* Typography */
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Jost', sans-serif;

    /* Layout */
    --header-height: 80px;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--color-brand-dark);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--color-brand-text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

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

/* Colors */
.text-brand-teal { color: var(--color-brand-teal); }
.text-brand-orange { color: var(--color-brand-orange); }
.text-brand-muted { color: var(--color-brand-gray-light); }
.text-white { color: var(--color-brand-text); }

/* Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Header */
.site-header {
    height: var(--header-height);
    background: rgba(32, 42, 48, 0.3); /* Slightly more transparent than card for hierarchy */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    align-items: center;
}

.header-logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--color-brand-text);
}

.header-logo-text span {
    color: var(--color-brand-orange);
}

.header-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--color-brand-gray-light);
    font-weight: 500;
}

/* Panel Cards */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
}

.panel-card {
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    group: hover;
}

.panel-card:hover {
    transform: translateY(-4px);
    border-color: rgba(47, 129, 145, 0.3); /* Teal subtle border */
    background: rgba(32, 42, 48, 0.8);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(47, 129, 145, 0.1); /* Teal tint */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.panel-card:hover .card-icon-wrapper {
    background: rgba(47, 129, 145, 0.2);
    transform: scale(1.1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--color-brand-teal);
    transition: color 0.3s ease;
}

.panel-card:hover .card-icon {
    color: var(--color-brand-teal-light);
}

/* Variant for Textos (Orange) */
.panel-card.card-orange:hover {
    border-color: rgba(255, 102, 0, 0.3);
}
.panel-card.card-orange .card-icon-wrapper {
    background: rgba(255, 102, 0, 0.1);
}
.panel-card.card-orange .card-icon {
    color: var(--color-brand-orange);
}
.panel-card.card-orange:hover .card-icon-wrapper {
    background: rgba(255, 102, 0, 0.2);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-brand-text);
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.95rem;
    color: var(--color-brand-gray-light);
    line-height: 1.5;
}

/* Premium Gradient Text */
.premium-gradient-text {
  background: linear-gradient(to right, var(--color-brand-orange), #f87171);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .panel-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        margin-top: calc(var(--header-height) + 2rem);
    }
}

/* Secondary Grid */
.secondary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto 4rem; /* Adjusted for desktop default */
    padding: 0 1rem;
}

.secondary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: left;
    cursor: pointer;
    background: var(--glass-bg); /* Ensure background is set */
    border: 1px solid var(--glass-border);
}

.secondary-card:hover {
    transform: translateY(-2px);
    background: rgba(32, 42, 48, 0.8);
    border-color: rgba(47, 129, 145, 0.3);
}

.secondary-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(47, 129, 145, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.secondary-icon {
    font-size: 1.5rem;
    color: var(--color-brand-teal);
}

.secondary-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--color-brand-text);
}

.secondary-desc {
    font-size: 0.85rem;
    color: var(--color-brand-gray-light);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-top: calc(var(--header-height) + 2rem);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.hero-title {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
     font-size: 1.1rem;
     color: var(--color-brand-gray-light);
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }

    .container {
        padding: 0 1.25rem; /* Symmetry fix: Ensure equal padding on container */
    }

    .site-header {
        position: fixed; /* Keep fixed to ensure it stays on top, but we must clear it */
        padding: 1rem 0;
        background: rgba(32, 42, 48, 0.95); /* More opaque on mobile */
    }
    
    .site-header .container {
        flex-direction: row; /* Keep row */
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: space-between;
        gap: 0.5rem;
    }

    /* Hide the NexWEB badge on mobile as requested */
    .header-badge {
        display: none;
    }

    /* Ensure specific top margin to clear the fixed header on mobile */
    .hero-section {
        margin-top: 140px; /* Concrete value to clear the wrapped or taller header */
        padding: 0;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .panel-grid {
        grid-template-columns: 1fr;
        padding: 0; /* Let container handle padding for symmetry */
        margin-top: 2rem !important;
    }

    .secondary-grid {
         grid-template-columns: 1fr;
         padding: 0;
    }

    /* Header text adjustments */
    .header-logo-text {
        font-size: 1.3rem;
    }
}

