/* ==========================================
   ManteSmart SPA - Stylesheet
   Design System: Minimalismo Moderno Premium
   ========================================== */

/* ===== Variables de Diseño ===== */
:root {
    /* Colores Primarios */
    --primary-500: #0057B7;
    --primary-700: #00438E;
    --primary-100: #E6F0FF;
    
    /* Colores Neutrales */
    --neutral-0: #FFFFFF;
    --neutral-50: #F8F9FA;
    --neutral-200: #E9ECEF;
    --neutral-500: #6C757D;
    --neutral-900: #212529;
    
    /* Colores Semánticos */
    --success: #198754;
    --warning: #FFC107;
    --error: #DC3545;
    
    /* Espaciado */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-xxl: 64px;
    --space-xxxl: 96px;
    
    /* Tipografía */
    --font-primary: 'Inter', sans-serif;
    
    /* Bordes y Sombras */
    --border-radius: 8px;
    --card-shadow: 0 8px 24px rgba(0, 87, 183, 0.08);
    
    /* Layout */
    --container-max-width: 1280px;
}

/* ===== Reset y Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 18px;
    line-height: 1.6;
    color: var(--neutral-900);
    background-color: var(--neutral-50);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 250ms ease-out;
}

ul {
    list-style: none;
}

/* ===== Tipografía ===== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 56px;
}

h2 {
    font-size: 40px;
}

h3 {
    font-size: 24px;
    font-weight: 600;
}

h4 {
    font-size: 20px;
    font-weight: 600;
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-md);
}

/* ===== Top Bar ===== */
.top-bar {
    background-color: var(--primary-500);
    color: var(--neutral-0);
    padding: var(--space-sm) 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: var(--space-lg);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--neutral-0);
    font-size: 14px;
}

.contact-link:hover {
    opacity: 0.8;
}

.contact-link .icon {
    width: 16px;
    height: 16px;
}

/* ===== Header ===== */
.header {
    background-color: var(--neutral-0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo a {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-500);
}

.logo-sub {
    font-size: 18px;
    font-weight: 600;
    color: var(--neutral-500);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background-color: var(--primary-500);
    border-radius: 2px;
    transition: all 250ms ease;
}

.nav-menu {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: var(--neutral-900);
    font-size: 16px;
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
    transition: all 250ms ease-out;
}

.nav-link:hover {
    color: var(--primary-500);
    background-color: var(--primary-100);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--neutral-0);
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius);
    padding: var(--space-sm);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 250ms ease-out;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin-bottom: var(--space-xs);
}

.dropdown-menu a {
    display: block;
    padding: var(--space-sm);
    color: var(--neutral-900);
    font-size: 15px;
    border-radius: var(--border-radius);
    transition: all 250ms ease-out;
}

.dropdown-menu a:hover {
    background-color: var(--primary-100);
    color: var(--primary-500);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 600ms ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 700px;
    z-index: 2;
}

.hero-title {
    color: var(--neutral-0);
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    color: var(--neutral-50);
    font-size: 20px;
    margin-bottom: var(--space-xl);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: none;
    color: var(--neutral-0);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 250ms ease-out;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-arrow svg {
    width: 24px;
    height: 24px;
}

.hero-arrow-left {
    left: var(--space-lg);
}

.hero-arrow-right {
    right: var(--space-lg);
}

.hero-indicators {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-sm);
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 250ms ease-out;
}

.indicator.active,
.indicator:hover {
    background: var(--neutral-0);
    width: 32px;
    border-radius: 6px;
}

/* ===== WhatsApp Floating Button ===== */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-link {
    display: block;
    background: #fcfdfd;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 250ms ease-out;
}

.whatsapp-link:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    width: 50px;
    height: 50px;
    display: block;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== Service Icon Frames ===== */
.service-icon-frame {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--space-md);
    border: 2px solid var(--primary-100);
    background: var(--neutral-50);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--border-radius) - 2px);
}

.service-icon {
    display: none;
}

/* ===== Featured Service Card (Contratos de Mantenimiento) ===== */
.service-card-featured {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-0) 100%);
    border: 2px solid var(--primary-200);
    position: relative;
    overflow: hidden;
}

.service-featured-image {
    width: 100%;
    height: 280px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    box-shadow: 0 8px 25px rgba(0, 87, 183, 0.15);
    position: relative;
}

.service-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-featured-image:hover img {
    transform: scale(1.05);
}

.service-featured-content {
    padding: 0 var(--space-sm);
}

.service-card-featured .service-title {
    color: var(--primary-700);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.service-card-featured .service-summary {
    color: var(--neutral-700);
    font-size: 1.1rem;
    line-height: 1.6;
}

.service-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-300));
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 250ms ease-out;
}

.btn-primary {
    background-color: var(--primary-500);
    color: var(--neutral-0);
}

.btn-primary:hover {
    background-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 87, 183, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-large {
    height: 56px;
    padding: 0 var(--space-xl);
    font-size: 18px;
}

/* ===== Sections ===== */
.section {
    padding: var(--space-xxxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-title.centered {
    text-align: center;
}

.section-subtitle {
    font-size: 20px;
    color: var(--neutral-500);
}

.section-text {
    color: var(--neutral-900);
    line-height: 1.7;
}

/* ===== Empresa Section ===== */
.section-empresa {
    background-color: var(--neutral-0);
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxl);
    align-items: center;
}

.section-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.feature-box {
    background-color: var(--primary-100);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-500);
    margin: var(--space-lg) 0;
}

.feature-box h3 {
    color: var(--primary-700);
    margin-bottom: var(--space-sm);
}

/* ===== Services Section ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.service-card {
    background-color: var(--neutral-0);
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all 300ms ease-out;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 87, 183, 0.12);
}

.service-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-500);
    margin-bottom: var(--space-md);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-title {
    color: var(--neutral-900);
    margin-bottom: var(--space-sm);
}

.service-summary {
    color: var(--neutral-500);
    margin-bottom: var(--space-md);
}

.service-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: none;
    border: none;
    color: var(--primary-500);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: all 250ms ease-out;
}

.service-toggle:hover {
    gap: var(--space-sm);
}

.toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 300ms ease-in-out;
}

.service-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

.service-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 300ms ease-in-out;
    padding-top: 0;
}

.service-card.expanded .service-details {
    max-height: 2000px;
    opacity: 1;
    padding-top: var(--space-md);
}

.service-details ul {
    list-style: disc;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.service-details li {
    margin-bottom: var(--space-xs);
    color: var(--neutral-900);
}

.highlight-box {
    background-color: var(--primary-100);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    margin-top: var(--space-md);
}

.highlight-box h4 {
    color: var(--primary-700);
    margin-top: 0;
}

/* ===== Contact Section ===== */
.section-contacto {
    background-color: var(--neutral-0);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-xxl);
}

.contact-form-wrapper {
    position: relative;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea {
    height: 52px;
    padding: var(--space-sm);
    background-color: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--neutral-900);
    transition: all 250ms ease-out;
}

.form-group textarea {
    height: auto;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border: 2px solid var(--primary-500);
    box-shadow: 0 0 0 3px rgba(0, 87, 183, 0.15);
}

.contact-form button[type="submit"] {
    grid-column: 1 / -1;
    margin-top: var(--space-md);
}

.form-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--neutral-0);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 300ms ease-out;
}

.form-success.show {
    opacity: 1;
    visibility: visible;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: var(--success);
    margin: 0 auto var(--space-md);
}

.form-success h3 {
    color: var(--success);
    margin-bottom: var(--space-sm);
}

.contact-info-card {
    background-color: var(--primary-500);
    color: var(--neutral-0);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    height: fit-content;
}

.contact-info-card h3 {
    margin-bottom: var(--space-lg);
    font-size: 28px;
}

.info-item {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.info-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 16px;
    margin: 0 0 var(--space-xs) 0;
    opacity: 0.9;
}

.info-item p {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--neutral-900);
    color: var(--neutral-0);
    padding: var(--space-xxl) 0 var(--space-lg) 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.footer-logo .logo-text {
    color: var(--neutral-0);
}

.footer-logo .logo-sub {
    color: var(--neutral-500);
}

.footer-description {
    color: var(--neutral-500);
    font-size: 15px;
}

.footer-col h4 {
    margin-bottom: var(--space-md);
    font-size: 18px;
}

.footer-links li,
.footer-contact li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--neutral-500);
    font-size: 15px;
    transition: all 250ms ease-out;
}

.footer-links a:hover {
    color: var(--neutral-0);
    padding-left: var(--space-xs);
}

.footer-contact li {
    color: var(--neutral-500);
    font-size: 15px;
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--neutral-500);
    font-size: 14px;
    margin: 0;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .section-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 40px;
    }
    
    h2 {
        font-size: 32px;
    }
    
    .hero {
        height: 450px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--neutral-0);
        flex-direction: column;
        padding: var(--space-lg) var(--space-md); /* Aumenté el padding superior */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 250ms ease-out;
        gap: var(--space-sm); /* Espacio mínimo entre elementos */
        align-items: flex-start; /* Alinea elementos a la izquierda */
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Dropdown en móvil - inicialmente oculto */
    .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 0;
        visibility: hidden;
        transform: none;
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 300ms ease-out;
        padding: 0 var(--space-md);
        background-color: transparent;
        border-left: none;
        border-radius: 0;
    }
    
    /* Dropdown abierto en móvil */
    .nav-dropdown.mobile-dropdown-active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 300px;
        margin-top: var(--space-xs);
        padding: var(--space-sm) var(--space-md);
        background-color: var(--primary-100);
        border-left: 3px solid var(--primary-500);
        border-radius: 4px;
    }
    
    /* Estilo para elementos del dropdown en móvil */
    .nav-dropdown .dropdown-menu li {
        margin-bottom: var(--space-xs);
    }
    
    .nav-dropdown .dropdown-menu li:last-child {
        margin-bottom: 0;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    /* Responsive para service-card-featured */
    .service-featured-image {
        height: 200px;
    }
    
    .service-card-featured .service-title {
        font-size: 1.3rem;
    }
    
    .service-card-featured .service-summary {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    .hero-arrow {
        width: 40px;
        height: 40px;
    }
    
    .hero-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .section {
        padding: var(--space-xxl) 0;
    }
    
    /* WhatsApp float responsive */
    .whatsapp-float {
        right: 15px;
        bottom: 15px;
    }
    
    .whatsapp-icon {
        width: 45px;
        height: 45px;
    }
    
    .service-icon-frame {
        width: 50px;
        height: 50px;
    }
    
    /* Responsive final para service-card-featured */
    .service-featured-image {
        height: 180px;
    }
}

/* ===== Media Query para Pantallas Grandes (PC/Desktop) ===== */
@media (min-width: 1024px) {
    .hero {
        height: 100vh;
        max-height: 800px; /* Altura máxima en monitores muy grandes */
    }
}
