/* styles.css */
:root {
    --primary-red: #CB2821; /* Red Atleti */
    --primary-red-hover: #A51E18;
    --primary-blue: #273B69; /* Blue Atleti logo */
    --dark-bg: #0F1115;
    --darker-bg: #08090B;
    --glass-bg: rgba(25, 28, 35, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    --gold: #D4AF37;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Typography utilities */
.text-red { color: var(--primary-red); }
.text-center { text-align: center; }
.w-100 { width: 100%; }

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.dark-bg {
    background-color: var(--darker-bg);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    padding: 0.75rem 1.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(203, 40, 33, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 0.75rem 1.5rem;
    width: 100%;
    margin-top: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary-red);
    color: white;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(8, 9, 11, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.2;
}

.logo img {
    height: 80px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-red);
    transition: width 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax */
    z-index: -2;
    transform: scale(1.05); /* Avoid edges */
    animation: zoomOut 20s infinite alternate;
}

@keyframes zoomOut {
    from { transform: scale(1.05); }
    to { transform: scale(1.15); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(8, 9, 11, 0.4), var(--dark-bg));
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1.2s ease;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Title */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 4px;
    background: var(--primary-red);
    border-radius: 2px;
}

.text-center.section-title::after {
    left: 25%;
}

/* About Text */
.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text b {
    color: white;
}

.about-img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--glass-border);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-main);
    margin-bottom: 0;
    font-size: 1rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 2rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--primary-red);
    border: 4px solid var(--darker-bg);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
}

.timeline-content h3 {
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.timeline-content p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Cards Grid (Eventos) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.event-card {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.event-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.event-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.event-date {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-red);
    color: white;
    padding: 0.5rem 1rem;
    font-weight: bold;
    border-bottom-left-radius: 16px;
    font-size: 0.9rem;
}

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

/* Match & News Panel */
.panel-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.match-panel, .news-panel {
    padding: 2.5rem;
    border-radius: 16px;
    height: 100%;
}

.match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    background: rgba(0,0,0,0.3);
    padding: 2rem;
    border-radius: 12px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.team span {
    font-weight: bold;
    font-size: 1.1rem;
}

.team img, .placeholder-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.placeholder-logo {
    background: #fff;
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.vs {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vs .time {
    font-size: 2.5rem;
    font-weight: 800;
}

.vs .date {
    color: var(--text-muted);
}

.vs .competition {
    color: var(--primary-red);
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-item {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.3s;
    cursor: pointer;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.news-item img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
}

.news-text h4 {
    margin-bottom: 0.5rem;
    color: white;
    font-size: 1.1rem;
}

.news-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Footer */
.footer {
    background: #050608;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    height: 120px;
}

.credo-rojo {
    color: var(--primary-red);
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
    letter-spacing: 1px;
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    margin-top: 2rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    padding: 3rem;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    color: white;
    font-size: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* AI Agent Chat */
.ai-agent-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 450px;
    height: 650px;
    background: var(--darker-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    z-index: 1500;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-agent-container.hidden {
    transform: translateY(150%) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

.ai-agent-header {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-hover));
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.ai-avatar {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-status {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.ai-status::before {
    content: '●';
    color: #10B981;
    margin-right: 5px;
}

.ai-close {
    background: transparent;
    color: white;
    margin-left: auto;
    font-size: 1.2rem;
}

.ai-chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ai-message {
    background: var(--glass-bg);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: white;
}

.user-message {
    background: var(--primary-red);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-input-area {
    padding: 1rem;
    background: rgba(25, 28, 35, 0.9);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

.ai-input-area input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    color: white;
}

.ai-input-area button {
    background: var(--primary-red);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.ai-input-area button:hover {
    background: var(--primary-red-hover);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links, .nav-actions {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
    }
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    .ai-agent-container {
        width: 100%;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.mt-2 {
    margin-top: 2rem;
}

/* Guerreros Table and Form Styles */
.guerreros-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
    font-size: 0.95rem;
}
.guerreros-table th {
    color: var(--primary-red);
    font-weight: bold;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0.5rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}
.guerreros-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}
.guerreros-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s, transform 0.2s;
    padding: 0.25rem 0.5rem;
}
.delete-btn:hover {
    color: var(--primary-red);
    transform: scale(1.1);
}

/* Contacto Button Styles */
.btn-contacto {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-contacto:hover {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-contacto i {
    font-size: 1.1rem;
}

/* Contact Modal Layout adjustments */
.contact-modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    max-height: 90vh;
    overflow-y: auto;
}

.service-chip {
    transition: all 0.3s ease;
    cursor: default;
}

.service-chip:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.detail-row a {
    transition: color 0.2s ease;
}

.detail-row a:hover {
    color: #60a5fa !important;
    text-decoration: underline !important;
}

/* Premium Logo Micro-interactions */
.contact-logo-wrapper {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.contact-logo-wrapper:hover {
    transform: translateY(-5px) scale(1.06);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5) !important;
    border-color: #60a5fa !important;
}

/* Premium Single Centered AI Red Button */
.btn-ia-rojo {
    background: linear-gradient(135deg, var(--primary-red), #e11d48);
    color: white;
    padding: 1.1rem 2.5rem;
    font-size: 1.15rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.5px;
    box-shadow: 0 6px 25px rgba(203, 40, 33, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-ia-rojo:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 35px rgba(203, 40, 33, 0.8);
    background: linear-gradient(135deg, #e11d48, var(--primary-red));
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-ia-rojo i {
    font-size: 1.3rem;
    animation: pulseRobot 2.5s infinite ease-in-out;
}

@keyframes pulseRobot {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 2px white); }
    50% { transform: scale(1.2) rotate(15deg); opacity: 0.85; filter: drop-shadow(0 0 8px rgba(255,255,255,0.6)); }
}

