@tailwind base;
@tailwind components;
@tailwind utilities;

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap");
html {
  scroll-behavior: smooth;
}
body {
  background-color: black;
  color: white;
  font-family: "Montserrat", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

/* --- OCULTAR SCROLLBAR (Para el Sidebar) --- */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- ESTADOS DEL NAVBAR (STICKY LOGO) --- */
#navbar,
#navbar-container,
#nav-logo,
#nav-text {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-scrolled #navbar-container {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.nav-scrolled #nav-logo {
  width: 3rem !important;
}

.nav-scrolled #nav-text {
  font-size: 1.125rem !important;
}

@media (max-width: 768px) {
  .nav-scrolled #navbar-container a {
    flex-direction: row !important;
    gap: 0.5rem !important;
  }
}

/* --- SIDEBAR --- */
#sidebar {
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

#sidebar a {
  transition: all 0.3s ease;
  color: white;
}

/* --- COMPONENTES DE PRODUCTO --- */
.ribbon {
  width: 85px;
  height: 85px;
  overflow: hidden;
  position: absolute;
  top: -3px;
  left: -3px;
  z-index: 10;
}

.ribbon span {
  position: absolute;
  display: block;
  width: 115px;
  padding: 8px 0;
  background-color: #dc2626;
  color: white;
  text-align: center;
  font-weight: 900;
  font-size: 0.7rem;
  text-transform: uppercase;
  transform: rotate(-45deg);
  top: 18px;
  left: -25px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.fly-item {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transition: all 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #facc15;
  box-shadow: 0 10px 25px rgba(250, 204, 21, 0.4);
}
    /* Estilos Personalizados para Curacaví FC */
    :root {
        --cfc-gold: #FFC107; /* El amarillo/dorado del club */
        --cfc-black: #111111;
        --cfc-gray: #f4f4f4;
    }

    .news-section {
        padding: 4rem 0;
        background-color: #ffffff; /* Fondo limpio para que destaquen las fotos */
    }

    

    /* Título de la sección */
    .section-title {
        font-size: 2.5rem;
        font-weight: 800;
        text-transform: uppercase;
        color: var(--cfc-black);
        margin-bottom: 3rem;
        position: relative;
        padding-left: 15px;
    }

    /* La barrita dorada al lado del título */
    .section-title::before {
        content: '';
        position: absolute;
        left: 0;
        top: 5px;
        bottom: 5px;
        width: 6px;
        background-color: var(--cfc-gold);
        border-radius: 2px;
    }

    /* GRID: El sistema de rejilla responsive */
    .news-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }

    /* TARJETA DE NOTICIA */
    .news-card {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
        border-bottom: 4px solid transparent; /* Preparamos el borde */
    }

    .news-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        border-bottom: 4px solid var(--cfc-gold); /* Borde dorado al pasar el mouse */
    }

    /* IMAGEN */
    .news-image {
        position: relative;
        height: 220px;
        overflow: hidden;
    }

    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Evita que la foto se deforme */
        transition: transform 0.5s ease;
    }

    .news-card:hover .news-image img {
        transform: scale(1.05); /* Zoom suave a la foto */
    }

    /* Etiqueta de fecha flotante */
    .news-date-badge {
        position: absolute;
        top: 15px;
        left: 15px;
        background: var(--cfc-gold);
        color: var(--cfc-black);
        font-weight: bold;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        text-transform: uppercase;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    /* CONTENIDO */
    .news-content {
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

    .news-content h3 {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--cfc-black);
        margin: 0 0 10px 0;
        line-height: 1.4;
    }

    .news-content p {
        color: #666;
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* Corta el texto a las 3 líneas */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* BOTÓN LEER MÁS */
    .btn-leermas {
        margin-top: auto; /* Empuja el botón al final */
        text-decoration: none;
        color: var(--cfc-black);
        font-weight: 700;
        font-size: 0.9rem;
        display: inline-flex;
        align-items: center;
        transition: color 0.3s ease;
    }

    .btn-leermas span {
        font-size: 1.2rem;
        margin-left: 5px;
        transition: transform 0.3s ease;
        color: var(--cfc-gold);
    }

    .news-card:hover .btn-leermas {
        color: #d8a200;
    }

    .news-card:hover .btn-leermas span {
        transform: translateX(5px); /* Mueve la flecha */
    }
