
/* ==========================================================
   MAGIBLOOM V7
   CSS organizado para mantenimiento
   ========================================================== */

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

:root{
    --bg:#07111d;
    --bg2:#102033;
    --card:#12253a;
    --card2:#203a57;
    --text:#ffffff;
    --muted:#c7d2e1;
    --pink:#ff2f86;
    --blue:#2563eb;
    --green:#4ade80;
    --orange:#f59e0b;
    --red:#ef4444;
}

body{
    background:var(--bg);
    color:var(--text);
    font-family:Arial,sans-serif;
    overflow-x:hidden;
}

/* HEADER */

.topbar{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:78px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 32px;
    background:rgba(4,12,22,.90);
    backdrop-filter:blur(14px);
    z-index:1000;
}
.brand {
    display: flex;
    align-items: center;
}

.brand img {
    width: 105px;
    height: auto;
    display: block;
    object-fit: contain;
}
/*
.brand img{
    width:105px;
    height:auto;
}
*/
.menu{
    display:flex;
    gap:28px;
}

.menu a{
    color:white;
    text-decoration:none;
    font-weight:600;
}

/* HERO */

.hero{
    position:relative;
    min-height:100vh;
    padding-top:78px;
    display:flex;
    align-items:center;
    background:
        linear-gradient(90deg,rgba(3,8,18,.86),rgba(3,8,18,.30)),
        url("../img/hero.jpg") center/cover no-repeat;
}

.overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.35));
}

.hero-content{
    position:relative;
    z-index:2;
    width:min(1320px,92%);
    margin:auto;
    display:grid;
    grid-template-columns:1fr 520px;
    gap:70px;
    align-items:center;
}

.hero-text h1{
    font-size:clamp(58px,8vw,96px);
    line-height:.90;
    font-weight:800;
    margin:18px 0;
}

.hero-text h1 span{
    display:block;
    color:var(--pink);
}

.hero-text p{
    font-size:30px;
    line-height:1.65;
    color:#d5dce6;
    margin-bottom:32px;
}

.badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:rgba(255,255,255,.12);
    padding:12px 18px;
    border-radius:999px;
    font-weight:700;
}

.hero-buttons{
    display:flex;
    gap:18px;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:16px 34px;
    border-radius:999px;
    text-decoration:none;
    font-weight:700;
}

.btn:first-child{
    background:var(--blue);
    color:white;
}

.btn.ghost{
    border:2px solid rgba(255,255,255,.35);
    color:white;
}

.hero-image{
    display:flex;
    justify-content:center;
}

.hero-bus{
    width:100%;
    max-width:520px;
    filter:drop-shadow(0 30px 50px rgba(0,0,0,.55));
}

/* TOP INFO */

.top-info {
    max-width: 1400px;
    margin: -36px auto 40px;
    padding: 0 32px;

    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;

    position: relative;
    z-index: 20;
}

.top-info .item {
    background: rgba(27, 49, 73, .96);
    border-radius: 16px;
    padding: 18px 20px;
    font-weight: 600;
    box-shadow: 0 12px 28px rgba(0,0,0,.28);
}

/* DASHBOARD */

.dashboard-grid {
    width: min(1320px, 92%);
    margin: 0 auto 50px;

    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 30px;

    align-items: start;
}

.card {
    background: linear-gradient(
        180deg,
        rgba(20,38,58,.96),
        rgba(17,33,50,.96)
    );
    border-radius: 28px;
    padding: 28px;
    overflow: hidden;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 24px;

    font-size: 22px;
    font-weight: 700;
}

/* ==========================
   RADAR MAGIBLOOM
========================== */

.circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.circle svg {
    width: 260px;
    height: 260px;
    display: block;
}

.circle svg text {
    fill: #ffffff;
    text-anchor: middle;
    dominant-baseline: middle;
}

.radar-bg {
    fill: none;
    stroke: #2d4d6d;
    stroke-width: 12;
}

.radar-fg {
    fill: none;
    stroke: #6be26a;
    stroke-width: 12;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
}

.indice-info {
    width: 100%;
    text-align: left;
}

.indice-info strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.indice-info p {
    margin: 0;
    line-height: 1.5;
    color: #d8e3ef;
}
/* ==========================================
   EXPLICACIÓN ÍNDICE MAGIBLOOM
   ========================================== */

.indice-info {
    text-align: center;
    margin: 6px 0 24px;
    padding: 0 10px;
}

.indice-info strong {
    display: block;
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 8px;
}

.indice-info p {
    color: #c7d2e1;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 430px;
    margin: 0 auto;
}

/* CALENDARIO */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.fecha {
    background: #203A57;

    border-radius: 18px;

    padding: 18px;

    min-height: 105px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    transition: 0.25s;
}

.fecha:hover {
    transform: translateY(-4px);
}

.fecha h3 {
    margin: 0;
    font-size: 38px;
}

.fecha small {
    color: #D4DDE8;
}

/* ==========================================
   Peak de floración
   ========================================== */

.peak-floracion {
    margin-top: 14px;
    padding: 10px;
    background: rgba(10, 22, 36, .85);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
}

.peak-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: .78rem;
    color: #c8d4e6;
}

.peak-label strong {
    color: #ffffff;
    font-size: .85rem;
    font-weight: 700;
}

.peak-bar {
    height: 8px;
    background: rgba(255, 255, 255, .08);
    border-radius: 999px;
    overflow: hidden;
}

.peak-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #67e36d 0%,
        #cfe95a 70%,
        #ff9b2f 100%
    );
    transition: width .4s ease;
}

/* INCLUYE */
.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.cards div {
    background: rgba(35, 55, 76, 0.95);

    border-radius: 14px;

    padding: 16px 18px;

    font-weight: 600;
}

.include-card ul {
    list-style: none;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 18px;

    margin-top: 24px;
}

.include-card li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 48px 20px;
    color: #E4E8EC;
}

/* TICKER */

.ticker{
    background:#16314a;
    overflow:hidden;
    padding:14px 0;
}

.ticker-track{
    white-space:nowrap;
    padding-left:100%;
    animation:tickerMove 22s linear infinite;
}

@keyframes tickerMove{
    from{
        transform:translateX(0);
    }

    to{
        transform:translateX(-100%);
    }
}

/* ===========================
   BARRA DE INFORMACIÓN
   =========================== */
.stats {
    width: min(1320px, 92%);
    margin: 22px auto 34px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stats div {
    background: rgba(32, 50, 70, 0.95);
    backdrop-filter: blur(10px);

    border-radius: 14px;

    padding: 18px;

    display: flex;
    align-items: center;
    gap: 10px;

    font-weight: 600;
}

/* ==========================================
   MAPA
   ========================================== */

#mapaLive {
    width: 100%;
    height: 520px;

    border-radius: 20px;

    overflow: hidden;

    margin-top: 20px;

    background: #122235;
}

.leaflet-container {
    width: 100%;
    height: 100%;

    border-radius: inherit;
}

/* ==========================================
   ÍCONO FLOR DESTACADO
   ========================================== */

.flor-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    font-size: 24px;

    background: #ec4899;
    border: 3px solid #ffffff;
    border-radius: 50%;

    box-shadow: 0 6px 16px rgba(236, 72, 153, 0.45);
}

/* ==========================================
   RESERVA ASIENTOS VISUAL
   ========================================== */
   
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.fecha-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fecha-link:hover .fecha {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.fecha {
    transition: all .25s ease;
    cursor: pointer;
}

.green {
    color: #63e06b;
}

.orange {
    color: #ffb020;
}

.red {
    color: #ff5d5d;
}

/* ==========================================
   Radar - texto bajo el indicador
   ========================================== */

.radar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.indice-info {
    max-width: 420px;
    margin-top: 18px;
    text-align: center;
}

.indice-info strong {
    display: block;
    margin-bottom: 8px;
}

.indice-info p {
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================
   FLORÓMETRO
========================== */

.florometro {
    background: linear-gradient(135deg,#13263b,#0d1d30);
    border-radius: 28px;
    padding: 28px;
    margin: 40px auto;
    max-width: 1320px;
}

.florometro-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.florometro-head h2 {
    margin: 0 0 6px;
}

.florometro-head p {
    margin: 0;
    color: #b8c7d8;
}

.indice-badge {
    background: rgba(255,255,255,.06);
    border-radius: 16px;
    padding: 12px 18px;
    text-align: center;
}

.indice-badge strong {
    display: block;
    font-size: 2rem;
}

.florometro-linea {
    position: relative;
    height: 4px;
    background: #2b4664;
    border-radius: 999px;
    margin: 30px 50px 50px;
}

.florometro-puntos {
    display: flex;
    justify-content: space-between;
    position: absolute;
    inset: -12px 0 auto 0;
}

.flor-item {
    width: 70px;
    text-align: center;
}

.flor-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 0 14px currentColor;
}

.flor-item span {
    display: block;
    margin-top: 24px;
    font-size: .95rem;
    color: #d9e5f1;
}

.flor-item strong {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
}

.dot-verde {
    background: #6be26a;
    color: #6be26a;
}

.dot-amarillo {
    background: #c9e04f;
    color: #c9e04f;
}

.dot-rosa {
    background: #ff4db3;
    color: #ff4db3;
}

.dot-naranja {
    background: #ffb347;
    color: #ffb347;
}

.flor-alerta {
    margin-top: 30px;
    background: rgba(255,255,255,.05);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    color: #d9e5f1;
}
/* Estados */

.florometro-punto.medium .dot {
    background: #b8d64c;
}

.florometro-punto.high .dot {
    background: #61df73;
}

.florometro-punto.low .dot {
    background: #ff9d2f;
}

.florometro-punto.peak .dot {
    background: #ff4ba0;
    box-shadow: 0 0 20px rgba(255,75,160,.75);
    animation: bloomPulse 2.2s infinite;
}

@keyframes bloomPulse {

    0% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(255,75,160,.55);
    }

    50% {
        transform: scale(1.25);
        box-shadow: 0 0 28px rgba(255,75,160,.95);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(255,75,160,.55);
    }

}

.florometro-leyenda {
    text-align: center;
    color: #d8e3f0;
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 14px 18px;
    line-height: 1.6;
}

@media (max-width: 900px) {

    .florometro-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .florometro-linea {
        overflow-x: auto;
        padding-bottom: 8px;
        gap: 26px;
    }

    .florometro-punto {
        min-width: 72px;
    }

}

/* RESPONSIVE */

@media (max-width: 992px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 640px) {

    .stats {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

}
/* ==========================================
   RESPONSIVE V6 - MÓVIL
   No modifica escritorio
   ========================================== */

@media (max-width: 768px) {

    /* Evita desbordes horizontales */

    html,
    body {
        overflow-x: hidden;
    }

    /* Header */

    .topbar {
        height: 64px;
        padding: 0 16px;
    }

    .brand img {
        width: 120px;
        height: auto;
    }

    .menu {
        gap: 12px;
        font-size: .9rem;
    }

    /* Hero */

    .hero {
        min-height: 85vh;
        padding-top: 64px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .hero h1 {
        font-size: 2.6rem;
        line-height: .95;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.6;
        max-width: 90%;
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* El bus desaparece en móvil */

    .hero-image {
        display: none;
    }

    .hero-bus {
        display: none;
    }

    /* Dashboard */

    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 0 14px;
        gap: 18px;
    }

    .card {
        padding: 18px;
        border-radius: 18px;
    }

    /* Radar */

    .circle svg {
        width: 220px;
        height: 220px;
    }

    /* Florómetro */

    .florometro {
        margin: 20px 14px;
        padding: 20px;
    }

    .florometro-head {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .florometro-linea {
        margin: 26px 20px 44px;
    }

    .florometro-puntos {
        gap: 18px;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .flor-item {
        min-width: 68px;
    }

    /* Calendario */

    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fecha {
        padding: 18px;
    }

    .fecha h3 {
        font-size: 2rem;
    }

    /* Mapa */

    #mapaLive {
        height: 380px;
    }

}

/* Teléfonos pequeños */

@media (max-width: 480px) {

    .calendar-grid {
        grid-template-columns: 1fr;
    }

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

    .brand img {
        width: 105px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .florometro-linea {
        margin: 24px 10px 40px;
    }

}