/* css/indexnew.css */

/* --- VARIABLES Y CONFIGURACIÓN GLOBAL --- */
:root {
    --bg-dark: #030504; /* Negro casi absoluto con un levísimo tono verde */
    --neon-green: #2fe05a;
    --neon-dim: rgba(47, 224, 90, 0.15);
    --glass-bg: rgba(10, 15, 12, 0.65);
    --glass-border: rgba(47, 224, 90, 0.25);
    --text-main: #e0e0e0;
    --text-muted: #8a9ba8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Cursor personalizado cibernético/botánico */
    cursor: url('../img/cursor-hoja.png'), auto;
}

/* Efecto de resplandor en el cursor para elementos clickeables */
a, button, .carousel-card, .close-btn {
    cursor: url('../img/cursor-hoja.png'), pointer;
}

body {
    background-color: var(--bg-dark);
    /* Grilla de fondo sutil tipo radar */
    background-image: 
        linear-gradient(var(--neon-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--neon-dim) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center top;
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- EFECTOS DE FONDO (Cyber-Botánico) --- */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

#leaves-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.falling-leaf {
    position: absolute;
    top: -10%;
    opacity: 0.6;
    filter: drop-shadow(0 0 5px var(--neon-green));
    animation: fall linear forwards;
}

@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* --- CONTENEDOR PRINCIPAL --- */
.main-wrapper {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* --- CLASE REUTILIZABLE: GLASSMORPHISM --- */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(47, 224, 90, 0.05);
}

/* --- HEADER / HERO --- */
.hero-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-wrapper {
    margin-bottom: 20px;
}

.main-logo {
    max-width: 300px;
    width: 100%;
    filter: drop-shadow(0 0 15px var(--neon-dim));
    animation: pulse-logo 4s infinite alternate;
}

@keyframes pulse-logo {
    0% { filter: drop-shadow(0 0 10px var(--neon-dim)); }
    100% { filter: drop-shadow(0 0 25px var(--neon-green)); }
}

.tagline {
    font-size: 1.2rem;
    color: var(--neon-green);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    margin-bottom: 40px;
    text-transform: uppercase;
}

/* --- TERMINAL DE HISTORIA --- */
.terminal-box {
    width: 100%;
    max-width: 700px;
    background: rgba(5, 8, 5, 0.9);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    margin-left: 15px;
    color: #888;
    font-family: monospace;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 25px;
    color: var(--neon-green);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    line-height: 1.6;
    min-height: 120px; /* Previene saltos mientras escribe */
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- INFO SECTION --- */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-green);
}

.info-card h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    margin-bottom: 15px;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.btn-cyber {
    display: inline-block;
    padding: 15px 30px;
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-muted);
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.btn-cyber:hover {
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-dim), inset 0 0 15px var(--neon-dim);
    text-shadow: 0 0 5px var(--neon-green);
}

.btn-pedidosya {
    border-color: #ff0044; /* Color de PedidosYa mezclado con estilo hacker */
}
.btn-pedidosya:hover {
    color: #ff0044;
    border-color: #ff0044;
    box-shadow: 0 0 15px rgba(255, 0, 68, 0.2), inset 0 0 15px rgba(255, 0, 68, 0.2);
    text-shadow: 0 0 5px #ff0044;
}

/* --- CARRUSEL DE EVENTOS --- */
.section-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    font-size: 1.5rem;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    display: inline-block;
}

.carousel-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.carousel-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.carousel-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px var(--neon-dim);
    transform: scale(1.02);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Aspect ratio 4:3 */
    background: #111;
}

.card-image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(80%) contrast(120%);
    transition: filter 0.3s ease;
}

.carousel-card:hover .card-image-wrapper img {
    filter: grayscale(0%) contrast(100%);
}

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(3, 5, 4, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-card:hover .card-overlay {
    opacity: 1;
}

.view-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    padding: 8px 15px;
    font-size: 0.9rem;
    background: rgba(47, 224, 90, 0.1);
}

.card-title {
    padding: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-main);
    border-top: 1px solid var(--glass-border);
}

/* --- MODAL (VENTANA EMERGENTE) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    position: relative;
    transform: translateY(50px);
    transition: transform 0.4s ease;
    padding: 2px; /* Espacio para el borde neón */
    background: linear-gradient(45deg, var(--glass-border), transparent, var(--glass-border));
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: -40px; right: 0;
    background: none;
    border: none;
    color: var(--neon-green);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
}

.modal-body {
    background: var(--bg-dark);
    border-radius: 13px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #333;
}

.glitch-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-green);
    font-size: 1.8rem;
    text-transform: uppercase;
}

#modal-desc {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #ccc;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #222;
    color: #666;
    font-size: 0.9rem;
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 768px) {
    .main-logo { max-width: 200px; }
    .tagline { font-size: 1rem; }
    .action-buttons { flex-direction: column; align-items: stretch; }
    .btn-cyber { text-align: center; }
    .terminal-body { font-size: 1rem; }
}