:root {
    /* Color Palette */
    --primary-color: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary-color: #EC4899;
    --accent-color: #06B6D4;
    
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --text-light: #F9FAFB;
    
    --bg-main: #F3F4F6;
    --bg-card: rgba(255, 255, 255, 0.85);
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(236, 72, 153, 0.9));
    --gradient-families: linear-gradient(135deg, #1e1b4b, #312e81);
    
    /* Family Colors */
    --color-info: #3B82F6;
    --color-admin: #10B981;
    --color-sport: #F59E0B;
    
    /* Effects */
    --shadow-main: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --border-glass: 1px solid rgba(255, 255, 255, 0.4);
    --glass-backdrop: blur(16px);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* Contains everything */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism utilities */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: var(--border-glass);
    border-radius: 1rem;
    box-shadow: var(--shadow-glass);
}

.glass {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: white !important;
}
.glass:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-3px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    border-radius: 3rem;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    border: 2px solid var(--primary-color);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
    border-color: var(--primary-dark);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 1.5rem 0;
    background: transparent;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* When not scrolled make text white for hero section contrast */
.navbar:not(.scrolled) .logo i, 
.navbar:not(.scrolled) .logo span {
    background: none;
    -webkit-text-fill-color: white;
    color: white;
}
.navbar:not(.scrolled) .nav-links li a {
    color: white;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-main);
}
.navbar:not(.scrolled) .mobile-menu-btn {
    color: white;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: url(../assets/fondofrontal.avif) no-repeat center center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 900px;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.35rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Sections Base */
.section {
    padding: 7rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color), var(--secondary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.section-header.white-text h2 {
    background: none;
    -webkit-text-fill-color: white;
    color: white;
    animation: none;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.15rem;
}
.section-header.white-text p {
    color: rgba(255,255,255,0.85);
}

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.process-card {
    padding: 3rem 2.5rem;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}
.process-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.icon-wrapper {
    width: 90px;
    height: 90px;
    margin: 0 auto 2rem auto;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
}

.process-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    color: var(--primary-dark);
}

.process-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Families Section */
.families-section {
    background: var(--gradient-families);
    position: relative;
}

.families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 3rem;
}

.family-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease;
    border-radius: 1.25rem;
}

.family-card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.family-image {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
}

.family-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.family-card:hover .family-image img {
    transform: scale(1.08);
}

.family-badge {
    position: absolute;
    bottom: -25px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 10;
}
.family-card:nth-child(2) .family-badge { background: var(--color-admin); }
.family-card:nth-child(3) .family-badge { background: var(--color-sport); }

.family-info {
    padding: 3rem 2.5rem 2.5rem 2.5rem;
}

.family-info h3 {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.family-info p {
    color: rgba(255,255,255,0.75);
    font-size: 1.05rem;
}

/* Companies Section */
.companies-section {
    background-color: var(--bg-main);
}

.table-container {
    padding: 2.5rem;
    background: white; 
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.table-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    font-family: var(--font-body);
    font-size: 1.05rem;
    outline: none;
    transition: all 0.3s ease;
    background: #F9FAFB;
}
.search-box input:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.filter-box select {
    padding: 1rem 1.25rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    background: white;
    color: var(--text-main);
    transition: all 0.3s ease;
}
.filter-box select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.companies-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 700px;
}

.companies-table th, 
.companies-table td {
    padding: 1.5rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #F3F4F6;
}

.companies-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    background: #F9FAFB;
}
.companies-table th:first-child { border-top-left-radius: 0.75rem; border-bottom-left-radius: 0.75rem; }
.companies-table th:last-child { border-top-right-radius: 0.75rem; border-bottom-right-radius: 0.75rem; }

.companies-table tbody tr {
    transition: all 0.2s ease;
}
.companies-table tbody tr:hover {
    background-color: #F8FAFC;
    transform: scale(1.005);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
}
.companies-table tbody tr:hover td {
    border-bottom-color: transparent;
}
.companies-table tbody tr:hover td:first-child { border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; }
.companies-table tbody tr:hover td:last-child { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }

.company-name {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}
.info-badge { background: rgba(59, 130, 246, 0.15); color: #2563EB; }
.admin-badge { background: rgba(16, 185, 129, 0.15); color: #059669; }
.sport-badge { background: rgba(245, 158, 11, 0.15); color: #D97706; }

.no-results {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}
.hidden {
    display: none;
}

/* Footer */
.footer {
    background: #0B1120;
    color: white;
    padding: 5rem 0 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-info p {
    color: #9CA3AF;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
}
.footer-info p i {
    color: var(--primary-light);
}

.footer-social {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}
.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

.footer-bottom {
    text-align: center;
    color: #6B7280;
    font-size: 0.95rem;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #F3F4F6;
    }
    
    .nav-links li a {
        display: block;
        padding: 1.25rem;
        color: var(--text-main) !important;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .table-container {
        padding: 1.5rem;
    }
}
