/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;600;700&display=swap');

/* Color Variables and Tokens */
:root {
    --primary-green: #69a71a;
    --primary-green-hover: #568c14;
    --secondary-green: #4d833f;
    --text-dark: #333333;
    --text-muted: #666666;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-footer: #f4f6f4;
    --border-color: #e2e8f0;
    --max-width: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

a:hover {
    color: var(--primary-green-hover);
    text-decoration: underline;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

/* Helper Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

/* Header Section styling */
header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

/* Top Mini bar */
.top-bar {
    background-color: #f1f3f1;
    font-size: 11px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e4e0;
}

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

.top-bar ul {
    list-style: none;
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-bar a {
    color: #555555;
    font-weight: 400;
}

.top-bar a:hover {
    color: var(--primary-green);
    text-decoration: none;
}

.top-bar-divider {
    color: #cccccc;
}

/* Main Navigation Bar */
.main-header {
    padding: 15px 0;
}

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

.logo-brand {
    display: flex;
    align-items: center;
}

.logo-brand img {
    height: 38px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search bar toggle */
.search-btn {
    background: transparent;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: #f1f3f1;
}

.search-btn img {
    width: 20px;
    height: 20px;
}

/* Brand Buttons */
.btn-tertiary {
    background-color: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 30px;
}

.btn-tertiary:hover {
    background-color: rgba(105, 167, 26, 0.05);
    color: var(--primary-green-hover);
    border-color: var(--primary-green-hover);
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--text-light);
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(105, 167, 26, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-green-hover);
    box-shadow: 0 4px 15px rgba(105, 167, 26, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Navigation Category Menu */
.nav-menu {
    border-top: 1px solid #f1f3f1;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    justify-content: space-between;
    padding: 12px 0;
}

.nav-menu li a {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 4px;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -12px;
    left: 0;
    background-color: var(--primary-green);
    transition: var(--transition);
}

.nav-menu li a:hover {
    color: var(--primary-green);
    text-decoration: none;
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle Button (Hamburger) */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* Main Content styling */
main {
    padding-bottom: 60px;
}

/* Hero Section */
.hero-section {
    padding: 60px 0 40px;
    background-color: var(--bg-white);
    text-align: center;
}

.hero-section h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.25;
}

.hero-section p {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Steps Block Layout */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 40px 0;
    min-height: 500px;
}

.step-card:nth-child(even) {
    flex-direction: row-reverse;
}

/* Left/Right Column proportions */
.step-image-col {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-image-wrapper {
    width: 100%;
    max-width: 480px;
    height: 420px;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
}

.step-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.step-card:hover .step-image-wrapper img {
    transform: scale(1.03);
}

.step-text-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-badge {
    color: var(--primary-green);
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-title {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 600;
}

.step-title b {
    color: var(--primary-green);
}

.step-description {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.step-links {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-links a {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    width: fit-content;
}

.step-links a::after {
    content: '→';
    margin-left: 6px;
    transition: var(--transition);
}

.step-links a:hover::after {
    transform: translateX(4px);
}

/* Step 5 Interactive Limit Slider Mockup */
.slider-simulation {
    background-color: #fcfdfc;
    border: 1px solid #d4ebd4;
    padding: 20px;
    border-radius: 16px;
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.slider-value {
    color: var(--primary-green);
    font-weight: 700;
}

.slider-range {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    margin-bottom: 15px;
}

.slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-green);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(105, 167, 26, 0.4);
    border: 2px solid white;
    transition: var(--transition);
}

.slider-range::-webkit-slider-thumb:hover {
    background: var(--primary-green-hover);
    transform: scale(1.1);
}

/* Bottom Text Banner Section */
.bottom-cta-section {
    background-color: var(--bg-light);
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.bottom-cta-card {
    background-color: var(--bg-white);
    padding: 40px 60px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    border: 1px solid rgba(105, 167, 26, 0.1);
}

.bottom-cta-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    max-width: 600px;
    line-height: 1.4;
}

.bottom-cta-text b {
    color: var(--primary-green);
}

/* Legales ReadMore section */
.legales-section {
    padding: 40px 0 20px;
}

.legales-accordion {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-white);
    transition: var(--transition);
}

.legales-trigger {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: left;
}

.legales-trigger:hover {
    background-color: #fafbfc;
}

.legales-icon {
    font-size: 14px;
    transition: var(--transition);
    transform: rotate(0deg);
}

.legales-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 24px;
    border-top: 1px solid transparent;
}

.legales-content p {
    font-size: 12px;
    color: var(--text-muted);
    padding: 15px 0 24px;
    line-height: 1.8;
}

/* Accordion open states (JS toggled) */
.legales-accordion.open .legales-icon {
    transform: rotate(180deg);
}

.legales-accordion.open .legales-content {
    max-height: 500px; /* high enough to contain legal text */
    border-top-color: var(--border-color);
}

/* Footer Section */
footer {
    background-color: var(--bg-footer);
    border-top: 1px solid var(--border-color);
    padding-top: 60px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
    position: relative;
}

/* Superintendent logo placement */
.super-logo-col {
    position: absolute;
    left: -70px;
    top: 0;
    height: 100%;
    display: flex;
    align-items: flex-start;
}

.super-logo-col img {
    height: 180px;
    width: auto;
}

.footer-col h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    color: #4a4a4a;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col li a {
    color: #666666;
    font-size: 12px;
    font-weight: 400;
}

.footer-col li a:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

/* CTA and social column */
.footer-cta-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.btn-block-card {
    background-color: transparent;
    border: 2px solid #999999;
    color: #4a4a4a;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 30px;
    text-align: center;
    width: 100%;
}

.btn-block-card:hover {
    background-color: #e8eae8;
    border-color: #666666;
}

.social-row {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon img {
    width: 32px;
    height: 32px;
    opacity: 0.7;
    transition: var(--transition);
}

.social-icon:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* Sub footer bottom strip */
.footer-bottom {
    border-top: 1px solid #e0e4e0;
    padding: 30px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #888888;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: #888888;
    font-weight: 400;
}

.footer-bottom-links a:hover {
    color: var(--primary-green);
}

/* Banca en Linea Modal Dialog Mockup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

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

.modal-card {
    background-color: var(--bg-white);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    background-color: var(--primary-green);
    color: white;
    padding: 24px;
    position: relative;
}

.modal-header h3 {
    color: white;
    font-size: 20px;
}

.modal-header p {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: transparent;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.modal-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(105, 167, 26, 0.15);
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-green);
    color: white;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(105, 167, 26, 0.2);
}

.btn-submit:hover {
    background-color: var(--primary-green-hover);
}

.modal-footer {
    padding: 0 24px 24px;
    text-align: center;
    font-size: 12px;
}

.modal-footer a {
    color: var(--primary-green);
    font-weight: 600;
}

/* Floating PSE Helper Button */
.floating-pse {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 10px;
    z-index: 99;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.floating-pse:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.floating-pse img {
    width: 32px;
    height: 32px;
}

.floating-pse-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Responsive Rules */
@media (max-width: 1200px) {
    .super-logo-col {
        display: none; /* Hide side super logo on smaller screens */
    }
}

@media (max-width: 992px) {
    .nav-menu {
        display: none; /* Mobile menu will toggle */
    }

    .nav-menu.active {
        display: block !important;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        box-shadow: var(--shadow-md);
        border-bottom: 2px solid var(--primary-green);
        z-index: 99;
    }

    .nav-menu.active ul {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        align-items: flex-start;
    }

    .nav-menu.active li {
        width: 100%;
    }

    .nav-menu.active li a::after {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .btn-tertiary {
        display: none; /* Hide secondary button in mobile to save space */
    }

    .hero-section h2 {
        font-size: 26px;
    }

    .hero-section p {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none; /* Hide topbar on mobile */
    }

    .step-card, .step-card:nth-child(even) {
        flex-direction: column;
        gap: 30px;
        min-height: auto;
        padding: 30px 0;
    }

    .step-image-col, .step-text-col {
        width: 100%;
        flex: none;
    }

    .step-image-wrapper {
        height: 300px;
    }

    .bottom-cta-card {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}
