/* ==== Base Styles ==== */
:root {
    --blue: #0f74bc;
    --teal: #13a89e;
    --red: #b83143;
    --text: #1a1a1a;
    --light-gray: #f5f5f5;
    --medium-gray: #e9e9e9;
    --max-width: 1100px;
}

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

body {
    font-family: "Inter", sans-serif;
    background-color: #ffffff;
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ==== Focus Styles for Accessibility ==== */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

/* ==== Skip to Content Link ==== */
.skip-to-content {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-to-content:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 10px;
    background: var(--blue);
    color: white;
    text-decoration: none;
    z-index: 10001;
}

/* ==== Logo Styles ==== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

/* Spanish text is usually longer */
html[lang="es"] .logo-text {
    font-size: 1rem;
}

/* ==== Navbar ==== */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.menu {
    display: flex;
    gap: 28px;
}

.menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.menu a.active,
.menu a:hover {
    color: var(--blue);
    border-color: var(--blue);
}

.menu a[aria-current="page"] {
    font-weight: 600;
}

.nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.signup-btn {
    background: var(--red);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.signup-btn:hover {
    background: #9c2a3a;
    transform: translateY(-2px);
}

.lang-buttons {
    display: flex;
    gap: 8px;
}

.lang-buttons button {
    background: transparent;
    border: 1px solid var(--blue);
    border-radius: 6px;
    color: var(--blue);
    padding: 6px 12px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.lang-buttons button:hover,
.lang-buttons button.active-lang {
    background: rgba(15, 116, 188, 0.1);
}

.flag {
    font-size: 16px;
}

/* ==== Back to Top Button ==== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--blue);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(15, 116, 188, 0.3);
    border: none;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--teal);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(15, 116, 188, 0.4);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* ==== Hero Section ==== */
.hero {
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.tagline {
    font-style: italic;
    margin-bottom: 30px;
    font-size: 18px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 16px;
    text-align: center;
}

.btn.primary {
    background: var(--red);
    color: #fff;
}

.btn.primary:hover {
    background: #9c2a3a;
    transform: translateY(-2px);
}

.btn.secondary {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
}

.btn.secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* ==== Content Sections ==== */
.content-section {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 24px;
    color: var(--blue);
    font-weight: 600;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--teal);
    font-weight: 600;
    line-height: 1.3;
}

.section-content {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 800px;
    line-height: 1.6;
}

.quote {
    font-style: italic;
    font-size: 20px;
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: var(--light-gray);
    border-radius: 10px;
    border-left: 4px solid var(--teal);
    line-height: 1.5;
}

/* ==== Blue Quote Section with Logo ==== */
.quote-section {
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: white;
    padding: 80px 0;
}

.quote-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.quote-logo {
    height: 100px;
    width: auto;
    flex-shrink: 0;
}

.quote-content {
    flex: 1;
}

.quote-content .quote {
    font-style: italic;
    font-size: 24px;
    text-align: left;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: white;
    line-height: 1.4;
}

/* ==== Stats & Features ==== */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.stat-card {
    flex: 1;
    min-width: 250px;
    background: var(--light-gray);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.stat-percentage {
    font-size: 48px;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 10px;
    line-height: 1;
}

.stat-description {
    font-size: 16px;
    color: var(--text);
    line-height: 1.4;
}

.features-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    flex: 1;
    min-width: 250px;
    padding: 30px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--teal);
    line-height: 1;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--blue);
    line-height: 1.3;
}

.feature-description {
    font-size: 16px;
    color: var(--text);
    line-height: 1.5;
}

/* ==== Modules & Lists ==== */
.modules-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.module-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    line-height: 1.4;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.partner-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==== Form Styles ==== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: "Inter", sans-serif;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blue);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ==== Social Button Styles ==== */
.social-button {
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    min-width: 100px;
    font-size: 14px;
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.linkedin {
    background: #0A66C2;
    color: white;
}

.instagram {
    background: #E4405F;
    color: white;
}

.facebook {
    background: #1877F2;
    color: white;
}

/* ==== Designer Credit Styles ==== */
.designer-credit {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.designer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #0A66C2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.designer-link:hover {
    color: #0a4a8c;
    text-decoration: underline;
}

.designer-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ==== Error and Success Messages ==== */
.error-message {
    color: var(--red);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.success-message {
    background: var(--teal);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
}

/* ==== Footer Logo Styles ==== */
.footer-logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 15px;
}

.footer-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==== Footer ==== */
.footer {
    background: var(--light-gray);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.footer-links a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 16px;
}

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

.footer-email {
    color: var(--blue);
    text-decoration: none;
}

.footer-email:hover {
    text-decoration: underline;
}

.copyright {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 14px;
}

/* ==== Cookie Popup ==== */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 10000;
    max-width: 380px;
    width: 90%;
    text-align: center;
    border: 3px solid var(--blue);
    display: none;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-popup h3 {
    color: var(--blue);
    margin-bottom: 10px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1.3;
}

.cookie-popup p {
    margin-bottom: 20px;
    color: var(--text);
    line-height: 1.5;
    font-size: 15px;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 100px;
}

.cookie-btn.accept {
    background: var(--teal);
    color: white;
}

.cookie-btn.accept:hover {
    background: #0f8c82;
    transform: translateY(-2px);
}

.cookie-btn.reject {
    background: var(--red);
    color: white;
}

.cookie-btn.reject:hover {
    background: #9c2a3a;
    transform: translateY(-2px);
}

/* ==== Privacy Policy Styles ==== */
.privacy-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.privacy-content h2 {
    color: var(--blue);
    margin: 30px 0 15px 0;
    font-size: 24px;
    line-height: 1.3;
}

.privacy-content h2:first-child {
    margin-top: 0;
}

.privacy-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.privacy-content ul {
    margin: 15px 0 25px 20px;
}

.privacy-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.privacy-content strong {
    color: var(--blue);
}

.eu-notice {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid var(--teal);
}

/* ==== Contact Grid ==== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==== Print Styles ==== */
@media print {
    .navbar,
    .footer,
    .cookie-popup,
    .buttons,
    .signup-btn,
    .quote-logo,
    .logo-img,
    .footer-logo,
    .lang-buttons,
    .hero-signup,
    .back-to-top {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }
    
    .content-section {
        padding: 10px 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
    
    h1, h2, h3, h4 {
        page-break-after: avoid;
    }
    
    /* Keep contact info visible */
    .footer-email,
    .footer-links a[href^="mailto:"] {
        display: inline !important;
        color: #000 !important;
        font-weight: bold;
    }
    
    /* Keep designer credit in print */
    .designer-credit {
        display: block !important;
        color: #000 !important;
    }
    
    /* Prevent page break inside important sections */
    .feature-card,
    .module-item {
        page-break-inside: avoid;
    }
}

/* ==== Mobile Responsive Styles ==== */
@media (max-width: 1024px) {
    .logo-text {
        font-size: 1.1rem;
    }
    
    html[lang="es"] .logo-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    /* Navbar */
    .nav-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .menu a {
        font-size: 14px;
    }
    
    /* Logo */
    .logo {
        flex-direction: row;
        gap: 8px;
        width: 100%;
        justify-content: center;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .logo-text {
        font-size: 1rem;
        white-space: normal;
        text-align: center;
        max-width: 250px;
    }
    
    html[lang="es"] .logo-text {
        font-size: 0.9rem;
        max-width: 220px;
    }
    
    /* Hero */
    .hero {
        padding: 70px 20px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    /* Content Sections */
    .content-section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 22px;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
    }
    
    /* Footer Logo */
    .footer-logo {
        height: 50px;
    }
    
    .footer-logo-text {
        font-size: 1.1rem;
    }
    
    /* Designer Credit */
    .designer-credit {
        flex-direction: column;
        gap: 5px;
    }
    
    /* Stats & Features */
    .stats-container,
    .features-container {
        flex-direction: column;
    }
    
    /* Blue Banner Quote with Logo */
    .quote-with-logo {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .quote-logo {
        height: 80px;
    }
    
    .quote-content .quote {
        text-align: center;
        font-size: 20px;
    }
    
    /* Cookie Popup */
    .cookie-popup {
        right: 10px;
        left: 10px;
        margin: 0 auto;
        bottom: 10px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    /* Privacy Policy */
    .privacy-content {
        padding: 20px;
    }
    
    /* Modules & Partners */
    .modules-container {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Language buttons */
    .lang-buttons {
        flex-direction: row;
    }
    
    .lang-buttons button {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .signup-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* Hero */
    .hero {
        padding: 50px 15px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    /* Sections */
    .section-title {
        font-size: 24px;
    }
    
    /* Logo */
    .logo {
        flex-direction: column;
        gap: 5px;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .logo-text {
        font-size: 0.9rem;
        line-height: 1.2;
        max-width: 200px;
    }
    
    html[lang="es"] .logo-text {
        font-size: 0.8rem;
        max-width: 180px;
    }
    
    /* Footer Logo */
    .footer-logo {
        height: 45px;
    }
    
    .footer-logo-text {
        font-size: 1rem;
    }
    
    /* Blue Banner Logo */
    .quote-logo {
        height: 70px;
    }
    
    .quote-content .quote {
        font-size: 18px;
    }
    
    .quote-section {
        padding: 60px 0;
    }
    
    /* Cards */
    .feature-card,
    .stat-card {
        min-width: 100%;
    }
    
    /* Partners Grid */
    .partners-grid {
        grid-template-columns: 1fr;
    }
    
    /* Language Buttons */
    .lang-buttons button {
        width: 100%;
        justify-content: center;
    }
}

/* ==== Tablet-specific fixes ==== */
@media (min-width: 769px) and (max-width: 1024px) {
    .logo-text {
        font-size: 1.1rem;
    }
    
    html[lang="es"] .logo-text {
        font-size: 0.95rem;
    }
    
    .menu {
        gap: 20px;
    }
    
    .menu a {
        font-size: 15px;
    }
}