/* --- Variables de Marca --- */
:root {
    --primary: #0161aa;
    --primary-dark: #014a82;
    --dark: #1a1a1a;
    --light: #ffffff;
    --gray: #f4f4f4;
    --text-dark: #333;
    --pear-dark: #0161aa;
    --pear-light: #699223;
    --transition: all 0.3s ease;
}

/* --- Reset General --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light);
    overflow-x: hidden;
}

/* --- Navegación --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    padding: 12px 5%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--light);
}

.logo img {
    height: 70px; 
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo img {
    height: 55px; 
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: var(--transition);
    font-weight: 400;
}

.nav-links a:hover { color: var(--primary); }

.menu-toggle, .close-menu {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light);
    background-size: cover;
    background-position: center;
    position: relative;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../assets/imagenes/img6.jpg');
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* --- Componentes --- */
.container {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

.badge {
    background: var(--pear-light);
    color: var(--light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

/* --- Grid & Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--pear-light);
    text-align: left;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover { transform: translateY(-5px); }

.image-placeholder {
    width: 100%;
    min-height: 220px; /* Asegura altura mínima */
    max-height: 280px; /* Evita que crezca demasiado en desktop */
    background: var(--gray);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Muestra la imagen completa sin recortar */
    padding: 10px; /* Margen interno para que la imagen no toque los bordes */
}

.card i { color: var(--primary); margin-bottom: 1rem; width: 32px; height: 32px; }
.card h3 { margin-bottom: 0.5rem; color: var(--primary); font-size: 1.25rem; }
.card p { font-size: 0.95rem; color: #666; margin-bottom: 8px; line-height: 1.4; }
.card p strong { color: var(--dark); }

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    text-decoration: none;
    overflow: hidden;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float img { width: 100%; height: 100%; object-fit: cover; }

/* --- Footer --- */
.main-footer {
    background: var(--dark);
    color: var(--light);
    padding: 80px 5% 40px;
}

.container-footer {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-logo-container { width: 200px; min-height: 80px; display: flex; align-items: center; }
.footer-brand-img { max-width: 100%; height: auto; }
.footer-description { color: #aaa; font-size: 0.9rem; line-height: 1.8; }
.social-icons { display: flex; gap: 15px; }

.social-icons a {
    color: var(--light);
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover { background: var(--pear-light); transform: translateY(-3px); }

.footer-links h4, .footer-contact h4 { color: var(--pear-light); text-transform: uppercase; margin-bottom: 25px; font-size: 1rem; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: #ccc; text-decoration: none; font-size: 0.9rem; transition: var(--transition); }
.footer-links a:hover { color: var(--light); padding-left: 5px; }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.contact-list li, .contact-list a { color: #ccc; text-decoration: none; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.contact-list a:hover { color: var(--light); }
.contact-list i { color: var(--pear-light); width: 18px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; text-align: center; color: #666; font-size: 0.85rem; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .menu-toggle { display: block; }
    .close-menu { display: block; position: absolute; top: 20px; right: 20px; color: white; }
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        background: var(--dark);
        flex-direction: column;
        padding: 60px 30px;
        transition: 0.4s ease;
        z-index: 2000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        align-items: flex-start;
    }
    .nav-links.show { right: 0; }
    .intro-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-brand, .footer-contact, .footer-links, .footer-dev { align-items: center; }
    .footer-logo-container { justify-content: center; }
}