/* CSS Variables */
:root {
    /* Palette: Dark Blue, Grey, White, Accent Blue */
    --primary-dark: #0f172a;
    /* Deep Navy */
    --primary-light: #1e293b;
    /* Lighter Navy */
    --accent-blue: #0284c7;
    /* Bright Blue for buttons/highlights */
    --accent-gold: #fbbf24;
    /* Subtle Gold for icons */
    --text-main: #334155;
    /* Dark Grey for text */
    --text-light: #94a3b8;
    /* Light Grey for subtitles */
    --white: #ffffff;
    --bg-light: #f8fafc;

    /* Spacing */
    --container-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img,
div.placeholder {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

.text-white {
    color: var(--white);
}

.mt-2 {
    margin-top: 2rem;
}

.section {
    padding: var(--spacing-lg) 0;
}

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

.section-dark {
    background-color: var(--primary-dark);
    color: var(--white);
    background-image: url('../assets/img/steps-bg.webp');
    background-size: cover;
    background-attachment: fixed;
    background-blend-mode: multiply;
}

.section-dark-blue {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0369a1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border-color: var(--white);
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

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

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

/* Header */
#header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.logo .accent-text {
    color: var(--accent-blue);
}

.nav-list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--white);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 5px 0;
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
    padding-top: 80px;
    /* Header height */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 1;
}

.hero-bg-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #334155;
    background-image: url('../assets/img/hero-bg.webp');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

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

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero h1 .highlight {
    color: var(--accent-blue);
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Features Grid */
.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.section-dark .section-header h2 {
    color: var(--white);
}

.divider {
    width: 60px;
    height: 4px;
    background-color: var(--accent-blue);
    margin: 0 auto 3rem;
    border-radius: 2px;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
    border: 1px solid #e2e8f0;
}

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

.icon-box {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-blue);
    display: flex;
    justify-content: start;
    align-items: center;
}

.icon-box svg {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

/* Timeline / Steps */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-content {
    width: 45%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;

    @media (max-width: 768px) {
        padding: 4rem 2rem 2rem 2rem;
    }
}

.timeline-img-placeholder {
    width: 450px;
    height: 300px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(251, 191, 36, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.timeline-img {
    width: 450px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.step-number {
    position: absolute;
    top: -12px;
    left: 20px;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.timeline-content h3 {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-blue);
}

.timeline-content p {
    position: relative;
    z-index: 1;
    color: #cbd5e1;
}

/* Reverse layout for even items */
.timeline-item.reverse {
    flex-direction: row-reverse;
}

/* Testimonials */
.quote-box {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.quote-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-blue);
    opacity: 0.2;
    margin-bottom: 1rem;
}

blockquote {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

cite {
    font-weight: 600;
    color: var(--accent-blue);
    font-style: normal;
}

/* Contact Section */
.grid-2-contact {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-list {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

/* Contact Image (Background) */
.contact-img-placeholder {
    height: 300px;
    background-image: url('../assets/img/contact-image.webp');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-top: 2rem;
    box-shadow: var(--shadow-md);
}

.contact-form-wrapper {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    color: var(--primary-dark);

    @media (max-width: 768px) {
        padding: 1.5rem;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #f1f5f9;
    transition: 0.3s;
}

.form-group textarea {
    field-sizing: content;
    /* Dynamic height based on content */
    min-height: 120px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

/* Footer */
footer {
    background: #020617;
    background-image: url('../assets/img/fondoFooer.webp');
    background-size: cover;
    background-position: center;
    padding: 3rem 0;
    /* Increased padding */
    color: #cbd5e1;
    /* Lighter text for contrast */
    text-align: center;
    position: relative;
    z-index: 1;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95);
    /* Darker overlay for better contrast */
    z-index: -1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    color: var(--white);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-logo p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-contact h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.footer-contact p {
    font-size: 0.95rem;
    color: #94a3b8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    font-size: 0.85rem;
    color: #64748b;
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Testimonials Grid */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.quote-box {
    text-align: center;
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s;
    height: 100%;
    /* Equal height */
    display: flex;
    /* vertical alignment */
    flex-direction: column;
    justify-content: center;
}

.quote-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
}

.quote-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-blue);
    opacity: 0.2;
    margin: 0 auto 1rem;
}

blockquote {
    font-size: 1.25rem;
    /* Slightly smaller for balance */
    font-style: italic;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

cite {
    font-weight: 600;
    color: var(--accent-blue);
    font-style: normal;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 30px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 56px;
        height: 56px;
    }
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary-dark);
        padding: 5rem 2rem;
        transition: 0.3s ease-in-out;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item.reverse {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 50px;
        gap: 1rem;
    }

    .timeline-img-placeholder,
    .timeline-content {
        width: 100%;
    }

    .timeline-img-placeholder,
    .timeline-img {
        width: 300px;
        height: 300px;
    }

    .grid-2-contact {
        grid-template-columns: 1fr;
    }

    .section {
        padding: var(--spacing-md) 0;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Typography Adjustments */
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .section-header h2 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .card h3,
    .timeline-content h3 {
        font-size: 1.3rem;
    }

    .card p,
    .timeline-content p {
        font-size: 0.95rem;
        line-height: 1.5;

        @media (max-width: 768px) {
            font-size: 0.8rem;
        }
    }

    blockquote {
        font-size: 1.1rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 16px;
        /* 16px prevents zoom on iOS inputs */
    }

    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }

    .contact-list li {
        font-size: 1rem;
    }
}



/* Footer Updates */
.footer-links {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #64748b;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Extra Small Devices (Stack Buttons) */
@media (max-width: 480px) {
    .hero-content {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 0.8rem;
        margin: 0 auto;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
        padding-left: 0;
        padding-right: 0;
        display: flex;
        justify-content: center;
    }
}

/* 404 Page Styles */

/* 404 Page (Redesign w/ Background) */
.error-section-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url('../assets/img/hero-bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    color: var(--white);
    padding-top: 60px;
}

.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    /* Dark blue overlay */
    backdrop-filter: blur(8px);
    /* Blur effect */
    z-index: 1;
}

.error-content-centered {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 2rem;
}

.error-code-bg {
    font-size: 10rem;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.3);
    opacity: 0.8;
    display: block;
    margin-bottom: -20px;
}

.error-content-centered h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.error-content-centered p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .error-code-bg {
        font-size: 6rem;
    }

    .error-content-centered h1 {
        font-size: 2rem;
    }
}