/*
* File: style.css
* Author: InverArg Development
* Description: Stylesheet for the InverArg - Cursos de Inversión en Argentina website.
*/

/* --------------------------------------------------
   1. CSS Variables & Global Setup
   -------------------------------------------------- */
:root {
    /* Analogous Color Scheme */
    --primary-color: #2980b9;      /* Corporate Blue (Base) */
    --primary-color-dark: #20638f;
    --secondary-color: #2c3e50;    /* Dark Slate Blue (Analogous) */
    --accent-color: #16a085;       /* Teal/Green (Analogous) */
    --accent-color-dark: #117a65;
    
    /* Neutral & Text Colors */
    --text-dark: #212121;          /* High contrast dark for light backgrounds */
    --text-medium: #555555;
    --text-light: #f1f1f1;         /* High contrast light for dark backgrounds */
    --bg-light: #f4f7f6;
    --bg-white: #ffffff;
    --border-color: #dddddd;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;

    /* Layout */
    --container-width: 1140px;
    --header-height: 80px;
    --border-radius: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------
   2. Typography & Base Elements
   -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-weight: 700;
    line-height: 1.2;
    text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

/* --------------------------------------------------
   3. Layout & Reusable Components
   -------------------------------------------------- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

/* Global Button Styles */
.btn, button, input[type='submit'] {
    display: inline-block;
    padding: 14px 35px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 50px; /* Modern pill shape */
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover, button:hover, input[type='submit']:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0,0,0,0.1), 0 3px 6px rgba(0,0,0,0.08);
    text-decoration: none;
}

.btn-primary, button[type='submit'] {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover, button[type='submit']:hover {
    background-color: var(--primary-color-dark);
    color: var(--text-light);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

/* Global Card Styles */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

.card .card-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
}

.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card .card-content {
    padding: 25px;
    text-align: center; /* Center aligns text content */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card .card-content h3 {
    margin-bottom: 0.75rem;
}

/* --------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 15px;
    height: var(--header-height);
    background: rgba(44, 62, 80, 0.8); /* Dark slate with opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    text-decoration: none;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

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

.nav-toggle, .nav-toggle-label {
    display: none;
}

/* --------------------------------------------------
   5. Page Sections
   -------------------------------------------------- */

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 15px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Simple parallax effect */
}

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

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

.hero-content h1, .hero-content p {
    color: var(--text-light); /* STRICT RULE: White text on hero */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* Skewed Section Styling */
.skewed-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    transform: skewY(-3deg);
    z-index: -1;
}

.unskew-content {
    transform: skewY(3deg);
}

.skewed-section-reverse {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.skewed-section-reverse .unskew-content {
    transform: skewY(0); /* Content is not skewed here, just the background section can be */
}

.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.9);
    z-index: 0;
}
.skewed-section-reverse .section-title, .skewed-section-reverse p {
    color: var(--text-light);
}

/* Webinars (Timeline) */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    opacity: 0.3;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-white);
    border: 4px solid var(--accent-color);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after {
    left: -10px;
}
.timeline-content .card { text-align: left; }
.timeline-content .card-content { text-align: left; }
.timeline-date {
    display: block;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Research (Stats Grid) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}
.stat-widget {
    padding: 30px;
    text-align: center;
    border-top: 5px solid var(--accent-color);
}
.stat-widget h3 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.stat-widget h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Innovation (Columns) */
.content-columns {
    display: flex;
    gap: 40px;
    align-items: center;
}
.column {
    flex: 1;
}
.column.is-two-thirds {
    flex: 2;
}
.section-title-left { text-align: left; }

/* Press / Partners */
.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
    margin-top: 2rem;
}
.partner-logo img {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* External Resources */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.resource-card h3 {
    font-size: 1.2rem;
}
.resource-card h3 a:hover {
    text-decoration: none;
    color: var(--accent-color);
}

/* Contact Form */
.contact-form {
    max-width: 700px;
    margin: 2rem auto 0 auto;
}
.form-group {
    position: relative;
    margin-bottom: 2rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: var(--text-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}
.form-group label {
    position: absolute;
    top: 15px;
    left: 15px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    pointer-events: none;
}
.form-group input:focus + label, 
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background: var(--secondary-color);
    padding: 0 5px;
    color: var(--accent-color);
}
.contact-form button {
    display: block;
    width: 100%;
}

/* --------------------------------------------------
   6. Footer
   -------------------------------------------------- */
.site-footer {
    background-color: var(--secondary-color);
    color: #aeb6bf;
    padding-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
.footer-col ul {
    list-style: none;
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a {
    color: #aeb6bf;
    text-decoration: none;
}
.footer-col a:hover {
    color: var(--accent-color);
    text-decoration: none;
}
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #4a5568;
    font-size: 0.9rem;
}

/* --------------------------------------------------
   7. Specific Pages & Utilities
   -------------------------------------------------- */
/* success.html */
.success-page body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-light);
}

/* privacy.html & terms.html */
.page-content main {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 60px;
}

.page-content h1 {
    margin-bottom: 2rem;
}

/* Particle Animation Container */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--secondary-color);
    z-index: -10;
}


/* --------------------------------------------------
   8. Responsive Design
   -------------------------------------------------- */
@media (max-width: 768px) {
    :root { --header-height: 70px; }

    section { padding: 60px 0; }

    .content-columns {
        flex-direction: column;
    }

    /* Mobile Navigation */
    .nav-toggle-label {
        display: block;
        width: 30px;
        height: 30px;
        position: relative;
        z-index: 1002;
        cursor: pointer;
    }
    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        position: absolute;
        display: block;
        width: 100%;
        height: 3px;
        background: var(--text-light);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    .nav-toggle-label span { top: 50%; transform: translateY(-50%); }
    .nav-toggle-label span::before { top: -10px; }
    .nav-toggle-label span::after { top: 10px; }

    .nav-toggle:checked + .nav-toggle-label span { background: transparent; }
    .nav-toggle:checked + .nav-toggle-label span::before { transform: rotate(45deg); top: 0; }
    .nav-toggle:checked + .nav-toggle-label span::after { transform: rotate(-45deg); top: 0; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--secondary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .nav-toggle:checked ~ .nav-menu {
        right: 0;
    }

    .nav-menu a {
        font-size: 1.5rem;
    }

    /* Timeline on Mobile */
    .timeline::after { left: 30px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after { left: 20px; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}