/* CSS Variables & Reset */
:root {
    --primary: #E30613;
    /* Mejoravit/Infonavit Red */
    --primary-dark: #b9050f;
    --primary-light: #fff0f0;
    --secondary: #58595B;
    /* Neutral Gray */
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #f8f8f8;
    --bg-white: #ffffff;
    --radius: 16px;
    /* Softer, larger radius */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px rgba(227, 6, 19, 0.15);
    /* Red tinted shadow */
    --font-family: 'Inter', sans-serif;
    --container-width: 1000px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.text-primary {
    color: var(--primary);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary);
    /* Strong red accent */
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.4);
}

/* Sections General */
section {
    padding: 5rem 0;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    /* Full screen feel */
    background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 3rem;
    /* Account for fixed header */
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-highlights {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* Friendly Form */
.form-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 550px;
    /* Wider as requested */
    width: 100%;
}

.form-card {
    background: white;
    padding: 1.5rem 2rem;
    /* Reduced vertical padding */
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    border: 1px solid #ffeef0;
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary);
}

.form-intro {
    text-align: center;
    margin-bottom: 1rem;
    /* Reduced margin */
}

.form-intro h3 {
    font-size: 1.35rem;
    /* Slightly smaller header */
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.form-intro p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.input-group {
    margin-bottom: 0.85rem;
    /* Tighter spacing */
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    /* More compact input */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
    font-family: inherit;
}

.input-group textarea {
    resize: vertical;
    min-height: 60px;
    /* Shorter default height */
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.input-icon {
    position: absolute;
    left: 0.8rem;
    top: 1.85rem;
    color: #9ca3af;
    width: 1.1rem;
    height: 1.1rem;
}

.btn-block {
    width: 100%;
    font-size: 1.1rem;
    padding: 1rem;
}

/* Content Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title span {
    display: block;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.section-title h2 {
    font-size: 2.5rem;
}

/* Requirements Section (Checklist) */
.requirements-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s;
}

.check-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #ffdce0;
}

.check-item.highlight {
    background: #fff0f0;
    border-color: #ffcdd2;
}

.check-icon {
    color: var(--primary);
    /* Red Icon */
    background: #fff;
    border-radius: 50%;
    padding: 0.25rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-item.highlight .check-icon {
    background: rgba(255, 255, 255, 0.5);
}

.check-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
    font-weight: 600;
}

.check-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .requirements-checklist {
        grid-template-columns: 1fr;
    }
}

/* Requirements Section (Enhanced) */
.requirements-section {
    background: white;
}

.req-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.req-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.req-item {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid #eee;
    transition: all 0.2s;
}

.req-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.req-icon-box {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Info / Doubts Section (Zig-Zag Layout) */
.info-section {
    background: #fff;
    border-top: none;
    padding: 4rem 0;
}

.info-zigzag {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.info-row.reverse .info-visual {
    order: -1;
    /* Image Left default for reverse row */
}

/* On mobile, stack vertically */
@media (max-width: 850px) {
    .info-row {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .info-row.reverse .info-visual {
        order: -1;
        /* Keep image on top on mobile too */
    }

    .info-visual {
        order: -1;
        /* Always image top on mobile */
    }

    .info-text {
        align-items: center;
    }
}

.info-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.info-visual img {
    width: 100%;
    border-radius: 20px;
    /* Soft round */
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.info-visual img:hover {
    transform: scale(1.02);
}

.info-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: #fff0f0;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.info-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 700;
}

.info-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Steps Section (Updated) */
.steps-section {
    background: #1a1a1a;
    /* Keep Dark */
    color: white;
}

.steps-section h2 {
    color: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background: #2a2a2a;
    /* Slightly lighter dark for card bg */
    border-radius: var(--radius);
    text-align: center;
    overflow: hidden;
    padding-bottom: 2rem;
}

.step-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.step-content {
    padding: 0 1.5rem;
}

.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    /* Red Highlight */
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

.step-card h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: #ccc;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: #f1f1f1;
    color: var(--text-muted);
    padding: 3rem 0;
    text-align: center;
}

/* Mobile Optimization */
@media (max-width: 850px) {

    .hero-layout,
    .req-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .hero {
        padding-top: 1rem;
        min-height: auto;
        padding-bottom: 3rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
        /* Smaller title on mobile */
        margin-bottom: 1rem;
    }

    .hero-highlights {
        justify-content: center;
        flex-wrap: wrap;
        /* Allow wrapping */
        gap: 1rem;
    }

    .form-wrapper {
        max-width: 100%;
        /* Full width on mobile */
        padding: 0 1rem;
    }

    .form-card {
        padding: 1.5rem;
        /* Tighter padding */
    }

    .gallery-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .input-icon {
        top: 1.95rem;
        /* Adjust icon position if needed */
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}