/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta corporativa */
    --primary: #009246;
    --primary-dark: #004D4E;
    --secondary: #00515E;
    --accent: #009594;
    --dark: #031D30;
    --light: #FFFFFF;
    
    /* Colores adicionales */
    --gray-light: #F8F9FA;
    --gray: #6C757D;
    --gray-dark: #343A40;
    
    /* Tipografías */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Kanit', sans-serif;
    
    /* Espaciado */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 5rem;
    
    /* Bordes */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Transiciones */
    --transition-fast: 200ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.75rem);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

/* Menu Toggle - Checkbox Hack */
.menu-toggle {
    display: none;
}

.menu-toggle-label {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle-label span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--light);
    border-radius: 3px;
    transition: var(--transition-normal);
}

.menu-toggle:checked ~ .menu-toggle-label span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle:checked ~ .menu-toggle-label span:nth-child(2) {
    opacity: 0;
}

.menu-toggle:checked ~ .menu-toggle-label span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.menu-toggle:checked ~ .nav {
    transform: translateX(0);
}

.nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: var(--light);
    font-weight: 500;
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background-color: var(--primary);
    color: var(--light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.nav-cta:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.nav-cta svg {
    width: 20px;
    height: 20px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    color: var(--light);
    padding: 6rem 0 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    margin-bottom: var(--space-lg);
    color: var(--light);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
}

.hero-subtitle strong {
    color: var(--accent);
}

.hero-ctas {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-secondary);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 146, 70, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--light);
    border-color: var(--light);
}

.btn-secondary:hover {
    background-color: var(--light);
    color: var(--dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--dark);
    border-color: var(--dark);
}

.btn-outline:hover {
    background-color: var(--dark);
    color: var(--light);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* Sections comunes */
.section {
    padding: var(--space-xxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
}

.section-title {
    color: var(--dark);
    margin-bottom: var(--space-md);
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    background: var(--light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--light);
}

.service-icon svg {
    width: 32px;
    height: 32px;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.service-desc {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.service-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: gap var(--transition-normal);
}

.service-link:hover {
    gap: var(--space-md);
}

/* Solutions */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
}

.solution-card {
    background: var(--light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.solution-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-md);
    color: var(--primary);
}

.solution-icon svg {
    width: 40px;
    height: 40px;
}

.solution-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.solution-desc {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Sectors */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.sector-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.sector-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--gray-light) 0%, var(--light) 100%);
}

.sector-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
}

.sector-icon svg {
    width: 32px;
    height: 32px;
}

.sector-name {
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
}

/* Certifications */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.certification-card {
    background: var(--light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-normal);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.certification-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: var(--space-md);
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all var(--transition-normal);
}

.certification-card:hover img {
    filter: grayscale(0);
    opacity: 1;
}

.certification-code {
    display: block;
    font-family: var(--font-secondary);
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

/* About Section */
.about {
    background-color: var(--gray-light);
}

.about-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: var(--space-xl);
}

.mission-vision {
    display: grid;
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

.mission, .vision {
    background: var(--light);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mission-title, .vision-title {
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.mission-text, .vision-text {
    font-style: italic;
    color: var(--gray-dark);
    border-left: 3px solid var(--accent);
    padding-left: var(--space-md);
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
    color: var(--light);
    text-align: center;
}

.cta-title {
    color: var(--light);
    margin-bottom: var(--space-md);
}

.cta-text {
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: var(--light);
    padding: var(--space-xxl) 0 var(--space-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.footer-logo img {
    height: 53px;
    margin-bottom: var(--space-lg);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.95rem;
    opacity: 0.9;
}

.contact-item svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.footer-title {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    color: var(--light);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-credits {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    opacity: 0.7;
}

.design-credit a {
    color: var(--accent);
    font-weight: 600;
}

.design-credit a:hover {
    text-decoration: underline;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all var(--transition-normal);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 800ms ease, transform 800ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        padding: 0 var(--space-lg);
    }
    
    .section {
        padding: var(--space-xl) 0;
    }
}

@media (max-width: 768px) {
    .menu-toggle-label {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background-color: var(--dark);
        flex-direction: column;
        padding: 100px var(--space-lg) var(--space-lg);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }
    
    .nav-link {
        display: block;
        padding: var(--space-sm);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-cta {
        justify-content: center;
        margin-top: var(--space-md);
    }
    
    .hero {
        padding: 5rem 0 3rem;
    }
    
    .hero-ctas {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .whatsapp-float {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .services-grid,
    .solutions-grid,
    .sectors-grid,
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    
    .mission-vision {
        grid-template-columns: 1fr;
    }
}