/* Global Styles & Variables */
:root {
    /* Clean Vibrant Palette */
    --bg-color: #FFFFFF;
    --text-color: #1a1a1a;
    --text-light: #555;

    /* Accents */
    --color-yellow: #FFEB3B;
    /* Vibrant Yellow */
    --color-pink: #FF69B4;
    /* Hot Pink */
    --primary-color: #FF69B4;
    /* Added for JS compatibility */
    --color-blue: #40E0D0;
    /* Turquoise */
    --color-purple: #9D50BB;
    /* Deep Purple */

    /* Functional */
    --white: #FFFFFF;
    --light-gray: #f8f9fa;
    --border-radius: 12px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Utilities */
.bg-yellow {
    background-color: var(--color-yellow);
}

.bg-pink {
    background-color: var(--color-pink);
    color: white;
}

.bg-blue {
    background-color: var(--color-blue);
}

.bg-purple {
    background-color: var(--color-purple);
    color: white;
}

.bg-light {
    background-color: var(--light-gray);
}

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

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mb-60 {
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--color-pink);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
    background-color: #c93d7c;
}

.btn-secondary {
    background-color: white;
    color: var(--text-color);
    border: 2px solid var(--text-color);
}

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

/* Header */
header {
    background-color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 5px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 40px;
}

.logo img {
    height: 200px;
    width: auto;
    transition: height 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-color);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-pink);
}

/* Fix for active button in nav */
.nav-links a.btn.active {
    color: white;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section (Image Heavy with Overlay) */
.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    /* Dark overlay for contrast */
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    max-width: 800px;
    color: white;
    padding: 0 24px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* Text shadow for readability */
}

.hero h1 {
    color: white;
    margin-bottom: 20px;
    font-size: 4rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 40px;
}

/* Page Headers (Small Hero with Overlay) */
.page-header {
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 60px;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9));
    /* Darker overlay */
    z-index: 1;
}

.page-header img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.page-header h1,
.page-header p {
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    /* Stronger shadow */
}

.page-header h1 {
    color: #FFFFFF !important;
    /* Force pure white */
    font-size: 3.5rem;
    margin: 0;
}

.page-header p {
    color: #FFFFFF !important;
    /* Force pure white */
    font-weight: 600;
    /* Make text slightly bolder */
}

/* Sections */
section {
    padding: 80px 0;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card-img {
    height: 250px;
    width: 100%;
    overflow: hidden;
}

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

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

.card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* About Specific */
.about-img-large {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

/* Services Specific */
.service-detail-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin-bottom: 40px;
}

.service-header {
    padding: 40px;
    color: white;
}

.service-body {
    padding: 40px;
}

/* FAQ */
.faq-item {
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.faq-item h4 {
    padding: 25px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.faq-item h4:hover {
    background-color: #f9f9f9;
}

.faq-item p {
    padding: 0 25px 25px;
    display: none;
    color: var(--text-light);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-pink);
    outline: none;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.1);
}

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

/* Footer */
footer {
    background-color: #111;
    color: white;
    padding: 80px 0 30px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 25px;
}

.footer-col a {
    color: #888;
}

.footer-col a:hover {
    color: var(--color-blue);
}

.copyright {
    border-top: 1px solid #333;
    margin-top: 60px;
    padding-top: 30px;
    text-align: center;
    color: #666;
}

/* Blog Specific Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    padding-bottom: 60px;
}

.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.blog-img-container {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.blog-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-img {
    transform: scale(1.1);
}

.blog-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.tag-article {
    color: var(--color-purple);
}

.tag-news {
    color: var(--color-blue);
}

.blog-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #888;
}

.blog-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.4;
    color: var(--text-color);
}

.blog-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 25px;
    flex-grow: 1;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: gap 0.3s ease;
}

.blog-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.blog-link:hover {
    gap: 5px;
}

.blog-link:hover i {
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {

    /* General Spacing */
    section {
        padding: 50px 0;
    }

    .mb-60 {
        margin-bottom: 40px;
    }

    /* Grids */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Navigation */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 30px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Typography */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .page-header {
        height: 300px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    /* Logo */
    .logo img {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .hero-content div {
        display: flex;
        flex-direction: column;
    }

    .hero-content .btn-secondary {
        margin-left: 0 !important;
    }
}

/* =============================================
   SOCIAL MEDIA ICONS
   ============================================= */

.social-icons {
    display: flex;
    flex-direction: row;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-icons.centered {
    justify-content: center;
    align-items: center;
}

.social-link {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

/* Brand Colors */
.social-link.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Footer Social - Smaller version */
footer .social-icons {
    margin-top: 20px;
    gap: 15px;
}

footer .social-link {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    box-shadow: none;
}

footer .social-link:hover {
    transform: translateY(-3px);
}

/* =============================================
   FORMACIONES PAGE - TIMELINE & CARDS
   ============================================= */

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-purple), var(--color-pink), var(--color-blue));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 40px;
}

.timeline-icon {
    position: absolute;
    left: -50px;
    top: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.timeline-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.timeline-date {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-purple), var(--color-pink));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content h3 {
    color: var(--color-dark);
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.timeline-role {
    color: var(--color-purple);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.timeline-tags span {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* Formation Cards */
.formation-card {
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.formation-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.formation-header {
    padding: 30px;
    text-align: center;
    color: white;
    font-size: 2.5rem;
}

.formation-date {
    display: inline-block;
    background: var(--color-pink);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.formation-org {
    color: var(--color-purple);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.formation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.formation-tags span {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-icon {
        left: -30px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .timeline-item {
        padding-left: 20px;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
    }

    /* Testimonials responsive */
    .testimonial-slider {
        grid-template-columns: 1fr !important;
    }
}

/* =============================================
   ADDITIONAL RESPONSIVE FIXES
   ============================================= */

@media (max-width: 768px) {

    /* Cookie Banner Mobile */
    #cookie-banner>div>div {
        flex-direction: column !important;
        text-align: center;
    }

    #cookie-banner button {
        width: 100% !important;
    }

    /* Sliders Mobile */
    .slider-container {
        padding: 0 10px;
    }

    .card.video-card,
    .card.book-card {
        min-width: 280px !important;
    }

    /* Social Icons Mobile */
    .social-icons {
        gap: 20px;
        justify-content: center;
    }

    .social-link {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Form Mobile */
    .form-group {
        margin-bottom: 20px;
    }

    /* Footer Mobile */
    footer .grid-3 {
        text-align: center;
    }

    footer .footer-col {
        margin-bottom: 30px;
    }

    /* Page Headers */
    .page-header {
        padding: 60px 20px;
    }

    /* Cards */
    .card {
        margin-bottom: 20px;
    }

    /* Formation Cards inline styles fix */
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* About page - 4 pillars */
    section[style*="background: linear-gradient(135deg, #1e293b"] [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    section[style*="background: linear-gradient(135deg, #1e293b"] [style*="grid-template-columns: repeat(4"]>div {
        padding: 15px !important;
    }

    section[style*="background: linear-gradient(135deg, #1e293b"] [style*="grid-template-columns: repeat(4"] h4 {
        font-size: 0.9rem !important;
    }

    section[style*="background: linear-gradient(135deg, #1e293b"] [style*="grid-template-columns: repeat(4"] p {
        font-size: 0.75rem !important;
    }

    /* CTA Sections */
    [style*="padding: 50px"] {
        padding: 30px 20px !important;
    }

    [style*="padding: 60px"] {
        padding: 40px 20px !important;
    }

    /* Hero adjustments */
    .hero-content {
        padding: 0 15px;
    }

    .hero-content p {
        font-size: 1rem !important;
    }

    /* Inline grids fix */
    .grid-2[style*="gap: 20px"] {
        gap: 15px !important;
    }

    /* FAQ items mobile */
    .faq-item {
        padding: 15px !important;
    }
}

@media (max-width: 480px) {

    /* Very small screens */
    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    /* 4 pillars stack on very small */
    [style*="grid-template-columns: repeat(4"],
    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    /* Buttons full width */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    /* Cards smaller padding */
    .card-content {
        padding: 20px;
    }

    /* Logo smaller */
    .logo img {
        height: 70px;
    }

    /* Contact form labels */
    label {
        font-size: 0.9rem;
    }
}