/* ============================================================
   Custom Properties — Light & Modern Theme
   ============================================================ */
:root {
    --primary-color:  #0056b3;
    --primary-light:  #4da3ff;
    --primary-dark:   #003d82;
    --accent-color:   #00d084;

    --bg-main:        #ffffff;
    --bg-secondary:   #f4f7fa;
    --bg-glass:       rgba(255, 255, 255, 0.90);
    --bg-overlay:     rgba(255, 255, 255, 0.72);

    --text-main:      #2d3748;
    --text-light:     #4a5568;
    --text-muted:     #718096;
    --border-color:   #e2e8f0;

    --font-family:    'Inter', system-ui, -apple-system, sans-serif;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.10);
    --shadow-md:  0 4px 6px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.10);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);

    --radius-md:  8px;
    --radius-lg:  14px;

    --transition-fast:   0.2s ease;
    --transition-normal: 0.3s ease;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Prevent text size bump on orientation change (iOS) */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

.text-center { text-align: center; }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3 {
    line-height: 1.2;
    color: var(--text-main);
}

.highlight { color: var(--primary-color); }

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 13px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================================
   Top Bar
   ============================================================ */
.top-bar {
    background-color: var(--primary-dark);
    color: #fff;
    padding: 8px 0;
    font-size: 0.82rem;
    position: relative;
    z-index: 1001;
}

.top-bar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
    align-items: center;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* ============================================================
   Header & Navigation
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-main);
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow var(--transition-normal),
                background-color var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo-name {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    line-height: 1;
    flex-shrink: 0;
}

/* Desktop nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.5vw, 30px);
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    transition: color var(--transition-fast);
}
.nav-link:hover            { color: var(--primary-color); }
.nav-link.btn-primary      { color: #fff; padding: 8px 18px; }
.nav-link.btn-primary:hover { color: #fff; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    z-index: 1002;
    background: none;
    border: none;
}

.bar {
    width: 26px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    display: block;
}

.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    min-height: clamp(420px, 90vh, 100vh);
    display: flex;
    align-items: center;
    position: relative;
    padding: clamp(60px, 10vw, 100px) 0;
    background: url('assets/images/hero-bg.png') center / cover no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 1;
}

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

.hero-title {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 2.2rem);
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 20px;
}

.hero-desc {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-light);
    margin-bottom: 36px;
    max-width: 560px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle, rgba(77,163,255,0.1) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* ============================================================
   Sections — common
   ============================================================ */
.section {
    padding: clamp(60px, 10vw, 100px) 0;
}

.bg-light { background-color: var(--bg-secondary); }

.section-title-wrapper {
    margin-bottom: clamp(30px, 5vw, 50px);
}

.section-title {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 14px;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.text-center .title-underline { margin: 0 auto; }

/* ============================================================
   About Section — 3 Cards
   ============================================================ */
.about-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(16px, 3vw, 30px);
}

.about-card {
    background-color: var(--bg-main);
    padding: clamp(24px, 4vw, 40px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    border: 1px solid var(--border-color);
}

.about-card.hover-effect:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.about-card h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 12px;
}

.about-card p { color: var(--text-light); font-size: 0.95rem; }

/* ============================================================
   Services Section — 4 Cards
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 3vw, 30px);
}

.service-card {
    background-color: var(--bg-main);
    padding: clamp(24px, 4vw, 40px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    border: 1px solid var(--border-color);
}

.service-card.hover-effect:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-icon {
    width: 56px;
    height: 56px;
    background-color: rgba(0, 86, 179, 0.10);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.service-card h3 {
    font-size: clamp(1.05rem, 2.5vw, 1.4rem);
    margin-bottom: 14px;
}

.service-card p { color: var(--text-light); }

/* Service bullet list */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    color: var(--text-light);
    padding: 7px 0 7px 22px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
    line-height: 1.5;
}

.service-list li:last-child { border-bottom: none; }

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 7px;
    height: 7px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* ============================================================
   Contact Section
   ============================================================ */
.contact-desc {
    color: var(--text-light);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-top: 10px;
}

.contact-form-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-main);
    padding: clamp(24px, 5vw, 40px);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 86, 179, 0.20), 0 0 15px rgba(0,0,0,0.04);
    border: 1px solid var(--primary-light);
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background-color: #fafafa;
    /* Prevent iOS zoom on focus */
    font-size: max(16px, 1rem);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-main);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.12);
}

.form-status {
    margin-top: 14px;
    padding: 14px;
    border-radius: var(--radius-md);
    display: none;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-status.success {
    display: block;
    background-color: rgba(0, 208, 132, 0.12);
    color: var(--accent-color);
}

.form-status.error {
    display: block;
    background-color: rgba(255, 59, 48, 0.10);
    color: #e53e3e;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    background-color: var(--text-main);
    color: #fff;
    padding: clamp(28px, 5vw, 44px) 0;
    text-align: center;
}

.footer-title {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-copy {
    color: #a0aec0;
    font-size: 0.85rem;
}

/* ============================================================
   Scroll Reveal Animation
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — Tablet  (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .nav-list {
        gap: 18px;
    }

    .about-cards-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   RESPONSIVE — Mobile Menu  (max 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* ── Hamburger visible ── */
    .hamburger {
        display: flex;
    }

    /* ── Fullscreen overlay nav ── */
    .nav {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100dvh;           /* dvh respeta el teclado virtual */
        background-color: var(--bg-glass);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-normal);
        z-index: 1001;
    }

    .nav.active {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-list {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .nav-link {
        font-size: 1.3rem;
    }

    .nav-link.btn-primary {
        padding: 12px 36px;
    }

    /* ── Hero ── */
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-buttons a {
        width: 100%;
        max-width: 340px;
    }

    /* ── Grids → 1 column ── */
    .about-cards-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* ── Contact form full width ── */
    .contact-form-wrapper {
        padding: 24px 18px;
    }
}

/* ============================================================
   RESPONSIVE — Small mobile  (max 480px)
   ============================================================ */
@media (max-width: 480px) {

    .top-bar {
        font-size: 0.78rem;
        padding: 10px 0;
    }

    .contact-info {
        flex-direction: column;
        gap: 4px;
    }

    .logo-name {
        font-size: 1rem;
    }

    .hero-title {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4.5vw, 1.3rem);
    }

    .section-title {
        font-size: clamp(1.4rem, 6vw, 1.9rem);
    }

    .about-card,
    .service-card {
        padding: 22px 18px;
    }

    .about-card h3,
    .service-card h3 {
        font-size: 1.1rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .contact-form-wrapper {
        padding: 20px 14px;
    }

    .form-group input,
    .form-group textarea {
        padding: 11px 12px;
    }
}

/* ============================================================
   RESPONSIVE — Extra small  (max 360px)
   ============================================================ */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.65rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .card-icon {
        width: 48px;
        height: 48px;
    }
}
