/* ==========================================================================
   1. CSS Variables & Global Styles
   ========================================================================== */

:root {
    /* Color Scheme (Monochrome Neumorphism) */
    --bg-color: #e4e9f2;
    --text-color: #3f4a5f;
    --title-color: #2c3340;
    --shadow-color-dark: #c8d0db;
    --shadow-color-light: #ffffff;
    --accent-color-primary: #5a7baf;
    --accent-color-secondary: #435d82;

    /* Fonts */
    --font-title: 'Archivo Black', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Neumorphism Properties */
    --neumorphic-shadow: 7px 7px 15px var(--shadow-color-dark), -7px -7px 15px var(--shadow-color-light);
    --neumorphic-shadow-inset: inset 7px 7px 15px var(--shadow-color-dark), inset -7px -7px 15px var(--shadow-color-light);
    --neumorphic-shadow-hover: 10px 10px 20px var(--shadow-color-dark), -10px -10px 20px var(--shadow-color-light);

    /* Animation */
    --transition-speed: 0.3s;
    --border-radius: 15px;
}

html {
    background-color: var(--bg-color);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 1.1rem;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ==========================================================================
   2. Typography & Base Elements
   ========================================================================== */

.title, .subtitle {
    font-family: var(--font-title);
    color: var(--title-color) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.section-title {
    margin-bottom: 3rem !important;
    font-weight: 700;
}

p {
    margin-bottom: 1.25rem;
}

.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 {
    font-family: var(--font-title);
    color: var(--title-color);
}

a {
    color: var(--accent-color-primary);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--accent-color-secondary);
}

/* ==========================================================================
   3. Global Components (Buttons, Inputs, Cards)
   ========================================================================== */

/* --- Buttons --- */
.button {
    border: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease-in-out;
    font-weight: 700;
}

.button-neumorphic {
    background: var(--bg-color);
    box-shadow: var(--neumorphic-shadow);
    color: var(--text-color);
}

.button-neumorphic:hover {
    box-shadow: var(--neumorphic-shadow-hover);
    transform: translateY(-2px);
    color: var(--accent-color-primary);
}

.button-neumorphic:active, .button-neumorphic:focus {
    box-shadow: var(--neumorphic-shadow-inset);
    transform: translateY(1px);
    color: var(--accent-color-secondary);
    outline: none;
}

.button-neumorphic-cta {
    background: linear-gradient(145deg, var(--accent-color-secondary), var(--accent-color-primary));
    box-shadow: 5px 5px 10px #394f71, -5px -5px 10px #6385be;
    color: #ffffff;
    font-family: var(--font-title);
    letter-spacing: 1px;
}

.button-neumorphic-cta:hover {
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 8px 8px 16px #394f71, -8px -8px 16px #6385be;
}

.button-neumorphic-cta:active, .button-neumorphic-cta:focus {
    color: #ffffff;
    transform: translateY(1px);
    box-shadow: inset 5px 5px 10px #394f71, inset -5px -5px 10px #6385be;
    outline: none;
}

/* --- Form Inputs --- */
.input-neumorphic, .textarea-neumorphic {
    background: var(--bg-color);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow-inset);
    color: var(--text-color);
    transition: box-shadow var(--transition-speed) ease-in-out;
}

.input-neumorphic::placeholder, .textarea-neumorphic::placeholder {
    color: #99a3b5;
}

.input-neumorphic:focus, .textarea-neumorphic:focus {
    outline: none;
    box-shadow: inset 5px 5px 10px var(--shadow-color-dark), inset -5px -5px 10px var(--shadow-color-light),
                0 0 0 2px var(--accent-color-primary);
}

/* --- Cards --- */
.card-neumorphic {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
    transition: all var(--transition-speed) ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensures cards in a row have same height */
}

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

.card-neumorphic .card-image img {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.card-neumorphic .card-content {
    flex-grow: 1; /* Allows content to fill available space */
}

/* ==========================================================================
   4. Layout & Sections
   ========================================================================== */

.section {
    padding: 4rem 1.5rem;
}

.main-container {
    overflow: hidden;
}

/* --- Header --- */
.header-neumorphic {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: var(--bg-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.navbar {
    background-color: transparent;
}

.navbar-item {
    font-weight: 700;
    color: var(--text-color);
}

.navbar-item:hover, .navbar-item.is-active {
    background-color: transparent !important;
    color: var(--accent-color-primary) !important;
}

.navbar-burger {
    color: var(--text-color);
}

.logo-text {
    font-family: var(--font-title);
    font-size: 1.5rem;
    letter-spacing: -1px;
}

/* --- Hero Section --- */
#hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
}

.hero-subtitle {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* --- Success Stories & Testimonials --- */
#casos-de-exito .card-content .title,
#blog .card-content .title {
    color: var(--title-color);
    margin-bottom: 0.75rem;
}

.progress-neumorphic {
    background-color: var(--bg-color);
    box-shadow: var(--neumorphic-shadow-inset);
    border-radius: 20px;
}
.progress-neumorphic::-webkit-progress-bar {
    background-color: transparent;
}
.progress-neumorphic::-webkit-progress-value {
    background: linear-gradient(to right, var(--accent-color-secondary), var(--accent-color-primary));
    border-radius: 20px;
    transition: width var(--transition-speed) ease;
}

.testimonial-card .media-left img {
    border: 3px solid var(--bg-color);
    box-shadow: var(--neumorphic-shadow);
}

/* --- FAQ Section --- */
.faq-item {
    background-color: var(--bg-color);
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 700;
    position: relative;
    transition: background-color var(--transition-speed) ease;
}

.faq-question:hover {
    background-color: #dbe1eb;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: transform var(--transition-speed) ease;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease-in-out, padding var(--transition-speed) ease-in-out;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    padding: 1rem 1.5rem;
}

/* --- External Resources --- */
.box-neumorphic-inset {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow-inset);
    padding: 2rem;
}

.resource-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--shadow-color-dark);
}
.resource-item:last-child {
    border-bottom: none;
}

/* --- Contact Form --- */
.contact-form .label {
    color: var(--text-color);
    font-weight: 700;
}

/* --- Footer --- */
.footer-neumorphic {
    background-color: #d1d7e0;
    padding: 3rem 1.5rem;
    color: var(--text-color);
    border-top: 1px solid var(--shadow-color-dark);
}

.footer-neumorphic .title {
    color: var(--title-color) !important;
}

.footer-neumorphic a {
    color: var(--text-color);
}

.footer-neumorphic a:hover {
    color: var(--accent-color-primary);
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    margin-right: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

/* ==========================================================================
   5. Specific Page Styles
   ========================================================================== */

/* --- success.html --- */
.success-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 2rem;
}

.success-box {
    max-width: 600px;
    padding: 3rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
}

/* --- privacy.html & terms.html --- */
.legal-page-content {
    padding-top: 120px; /* Space for fixed header */
    padding-bottom: 4rem;
}
.legal-page-content .content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--neumorphic-shadow);
}

/* ==========================================================================
   6. Responsiveness
   ========================================================================== */

@media screen and (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .section-title {
        margin-bottom: 2rem !important;
    }
    
    .client-logos .column {
        padding: 1.5rem;
    }
}