/* 1. IMPORTACIONES (SIEMPRE VAN AL INICIO DEL ARCHIVO) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* 2. VARIABLES */
:root {
    --primary-color:  #afae89;
    --dark-bg: #12253a;
    --darker-bg: #0a0a0a;
    --ligth-text: #F9F5EB;
    --gray-text: #aaaaaa;
    --card-bg: #C8DAEE;
    --border-color: #3e3838;
    --transition: all .3s ease;
}

/****************************** CONFIGURACIONES GENERALES *****************************/
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--primary-color) var(--dark-bg);
}

body {
    font-family: 'Poppins', sans-serif; /* Usamos Poppins globalmente para que luzca profesional */
    line-height: 1.6;
    background-color: var(--dark-bg);
    color: var(--ligth-text);
    overflow-x: hidden; /* Evita scrolls horizontales rotos en celulares */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/*********************** APARTADO DE HEADER *********************/
#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px; /* Corregido: se agregó 'px' */
    margin: 0 auto;
    background-color: var(--dark-bg);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-img {
    max-width: 70px;
    height: auto;
    border-radius: 50%;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    position: relative;
    padding: .5rem 0;
    transition: var(--transition);
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--ligth-text);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover:after {
    width: 100%; /* Cambiado a 100% para que se adapte al tamaño del texto */
}

/*********************** SECCIÓN DE INFORMACIÓN *********************/
.info-container {
    background-color: var(--dark-bg);
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.info-content {
    background-color: #ffffff;
    max-width: 950px;
    width: 100%;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #007bc4; 
}

.info-content h2 {
    color: #1a202c;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 700;
}

.info-content p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.info-content ul {
    padding: 0;
    margin-bottom: 30px;
}

.info-content li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-content li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 2px;
    color: #007bc4;
    font-weight: bold;
    font-size: 1.1rem;
}

.info-content .price-notice {
    display: block;
    background-color: #eef7fc;
    color: #005689;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    border: 1px dashed #bce1f6;
}

/*********************** APARTADO DE CARDS (RESPONSIVO) *********************/
.card-container {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Mantiene las tarjetas con la misma altura si varían textos */
    flex-wrap: wrap;       /* PERMITE QUE BAJEN EN CELULARES */
    gap: 20px;            /* Espaciado moderno entre tarjetas */
    padding: 40px 20px;
}

.card {
    background: #ffffff;
    margin: 0;            /* Dejamos el control de separación al 'gap' del padre */
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    
    /* CONTROL DE ANCHOS DINÁMICOS */
    width: 100%;          
    max-width: 320px;     
    min-width: 280px;     /* No deja que se aplasten en pantallas intermedias */
    
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eef2f5;
    
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Mantiene los botones alineados abajo */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-header h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.card-header .price {
    font-size: 2rem;
    color: #10b981; 
    font-weight: 700;
    margin-bottom: 20px;
}

.card-header .price span {
    font-size: 1rem;
    color: #888;
    font-weight: 400;
}

.card-features ul {
    margin-bottom: 30px;
    padding: 0;
}

.card-features li {
    padding: 12px 0;
    color: #555;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
}

.card-features li:last-child {
    border-bottom: none;
}

.btn-price {
    display: block;
    background: #10b981;
    color: #ffffff;
    padding: 14px 0;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-price:hover {
    background: #059669; 
}

/*********************** CONTENEDOR E IMAGEN CCTV *********************/
.img-container-cctv {
    width: 100%;
    max-width: 800px;        
    margin: 30px auto;       
    padding: 0 20px;        
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.img-cctv {
    display: block;          
    width: 100%;             
    max-width: 900px;        
    height: auto;            
    border-radius: 12px;     
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); 
    transition: var(--transition); 
}

.img-cctv:hover {
    transform: translateY(-5px); 
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15); 
    cursor: pointer;
}

/*********************** MEDIA QUERIES (ADAPTACIONES MÓVILES) *********************/

/* Tablets y Celulares (Pantallas menores a 768px) */
@media (max-width: 768px) {
    #navbar {
        flex-direction: column; /* Alinea el logo arriba y menú abajo */
        gap: 1rem;
        padding: 1.5rem 20px;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .info-container {
        padding: 20px 15px;
    }

    .info-content {
        padding: 25px 20px; /* Reducción de espacios internos para ganar área */
    }

    .info-content h2 {
        font-size: 1.5rem;
    }
}

/* Celulares Pequeños (Pantallas menores a 480px) */
@media (max-width: 480px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .card {
        padding: 20px 15px; /* Evita que el texto interno quede demasiado apretado */
    }
}