:root {
    --primary: #25D1B9;
    --primary-dark: #1A9E8B;
    --primary-glow: rgba(37, 209, 185, 0.4);
    --bg-dark: #05070A;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(37, 209, 185, 0.08);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(37, 209, 185, 0.5);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --font-heading: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    color-scheme: dark;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 10, 0.82);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    width: 200px;
}

.loader-logo {
    width: 150px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
}

.loader-bar-container {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

.loader-percent {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
}

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

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

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

/* Glassmorphism utility */
.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 3rem 2rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.glass-card > * {
    position: relative;
    z-index: 2;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(37, 209, 185, 0.1), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover,
.glass-card.mobile-highlight {
    background: rgba(37, 209, 185, 0.1) !important;
    border-color: rgba(37, 209, 185, 0.8) !important;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(37, 209, 185, 0.3);
    z-index: 10;
}

.glass-card:hover::before,
.glass-card.mobile-highlight::before {
    opacity: 1;
}

/* Specific spotlight for borders */
.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(37, 209, 185, 0.4), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 0;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    padding: 1px;
}

.glass-card:hover::after {
    opacity: 1;
}

/* Text Gradients */
.text-gradient {
    background: linear-gradient(135deg, #FFFFFF 20%, #25D1B9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #25D1B9;
    display: inline-block;
    filter: none !important;
}

/* Electric Effect */
.electric-text {
    position: relative;
    background: linear-gradient(
        90deg, 
        #25D1B9 0%, 
        #25D1B9 45%, 
        #fff 50%, 
        #25D1B9 55%, 
        #25D1B9 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite, electric-pulse 2s infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

@keyframes electric-pulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(37, 209, 185, 0.2);
    }
    50% {
        text-shadow: 0 0 20px rgba(37, 209, 185, 0.6), 0 0 30px rgba(255, 255, 255, 0.3);
    }
}

.mouse-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 209, 185, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    filter: blur(60px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1200px;
    z-index: 1000;
    padding: 0.8rem 1.5rem;
    background: rgba(5, 7, 10, 0.35); /* Increased transparency */
    backdrop-filter: blur(20px); /* Increased blur for better glass effect */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08); /* Slightly more visible border */
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    top: 10px;
    background: rgba(5, 7, 10, 0.6); /* Translucent even when scrolled */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

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

.logo-img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

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

.logo-highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn-primary {
    background: #25D1B9 !important; /* Force the bright green */
    color: #05070A !important;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid #25D1B9;
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    overflow: hidden;
    width: 100%;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.video-background iframe,
#youtube-player {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%; /* Changed from 100vw */
    height: 56.25vw;
    min-height: 100%;
    min-width: 177.77vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0; 
    transition: opacity 1s ease;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(5, 7, 10, 0.9) 0%, 
        rgba(5, 7, 10, 0.7) 50%, 
        var(--bg-dark) 100%);
    backdrop-filter: blur(2px); /* Subtle blur to hide UI artifacts */
    -webkit-backdrop-filter: blur(2px);
    z-index: -1;
    pointer-events: none;
}

/* New: Interaction blocker to prevent YouTube UI on mobile */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
    pointer-events: none;
}

.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
    opacity: 0.5;
}

.top-glow {
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
}

.mid-glow {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap; /* Allows buttons to stack on mobile */
    opacity: 0;
}

/* Ensure buttons don't touch on mobile */
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-outline {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

/* Sections */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden; 
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 2.8rem); /* Responsive font size */
    margin-bottom: 1rem;
}

.trust-anchors {
    margin-top: 3rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    flex-wrap: wrap;
    padding: 0 1rem;
}

.trust-anchors span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    perspective: 1000px;
}

@media (min-width: 600px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Stacked cards for Problemas section reveal */
#problemas .services-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 550px;
    margin-top: 1rem;
}

#problemas .service-card {
    position: absolute;
    width: 350px;
    max-width: 90vw;
    margin: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Disable absolute positioning on mobile for standard flow if JS fails or for simpler layout */
@media (max-width: 1100px) {
    #problemas .services-grid {
        display: grid;
        min-height: auto;
        gap: 2rem;
    }
    #problemas .service-card {
        position: relative;
        width: 100%;
        max-width: 100%;
        transform: none !important;
    }
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 209, 185, 0.05);
    border: 1px solid rgba(37, 209, 185, 0.2);
    border-radius: 16px;
    margin-bottom: 2rem;
    color: var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(37, 209, 185, 0.05);
}

.card-icon i {
    width: 28px;
    height: 28px;
    stroke-width: 1.5px;
}

.service-card:hover .card-icon {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 30px var(--primary-glow);
    transform: scale(1.1) rotate(5deg);
}

/* Workflow Timeline */
.workflow {
    position: relative;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 2rem 0;
    position: relative;
    width: 50%;
}

.timeline-item.left {
    left: 0;
    padding-right: 3rem;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    padding-left: 3rem;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--bg-dark);
    border: 4px solid var(--primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    box-shadow: 0 0 15px var(--primary-glow);
}

.timeline-item.left .timeline-dot {
    right: -10px;
}

.timeline-item.right .timeline-dot {
    left: -10px;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.about-card h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-card p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
}

.footer-service-links {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
    padding-left: 1.15rem;
}

.footer-service-links a {
    color: var(--text-muted);
    display: list-item;
    list-style: disc;
    padding-left: 0.15rem;
}

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

.footer h4 {
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

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

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid rgba(37, 209, 185, 0.55);
    border-radius: 8px;
    background: rgba(37, 209, 185, 0.06);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.footer-social a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(37, 209, 185, 0.12);
    box-shadow: 0 0 22px rgba(37, 209, 185, 0.22);
    transform: translateY(-2px);
}

.footer-social i,
.footer-social svg {
    width: 18px;
    height: 18px;
}

.footer-social svg {
    display: block;
    fill: currentColor;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.brand-ia,
.footer .brand-ia,
.footer-bottom .brand-ia {
    color: var(--primary);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    section {
        padding: 4rem 1rem;
    }

    .nav-links {
        display: none;
    }

    .navbar {
        top: 15px;
        left: 4%;
        transform: none;
        width: 92%;
        padding: 0.6rem 1rem;
        border-radius: 100px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(5, 7, 10, 0.5);
    }

    .navbar.scrolled {
        top: 10px;
        left: 4%;
        transform: none;
        background: rgba(5, 7, 10, 0.7);
    }

    .nav-container {
        padding: 0 0.5rem;
    }

    .logo-img {
        height: 26px;
    }

    .nav-cta {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        border-radius: 50px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .video-background iframe,
    #youtube-player {
        width: 400%; /* Large enough to cover all mobile aspects */
        height: 100%;
        min-width: 400%;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    section {
        padding: 4rem 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .cta-card {
        padding: 1.5rem;
    }

    .cta-arrow {
        width: 40px;
        height: 40px;
    }

    .timeline-line {
        left: 20px;
        transform: none;
    }
    
    .timeline-item {
        width: 100% !important;
        padding-left: 50px !important;
        padding-right: 0 !important;
        text-align: left !important;
        left: 0 !important;
    }
    
    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }
}

/* Contact Section Specifics */
.contact {
    padding-top: 6rem;
    padding-bottom: 8rem;
    position: relative;
    z-index: 5;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-container form {
    padding: 3rem;
}

@media (max-width: 768px) {
    .contact {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .contact-container form {
        padding: 2rem 1.5rem;
    }
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(37, 209, 185, 0.05);
    box-shadow: 0 0 15px rgba(37, 209, 185, 0.1);
}

.full-width {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    font-size: 1.125rem;
}

@media (max-width: 768px) {
    .full-width {
        font-size: 1rem;
    }
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    animation: fadeIn 0.5s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(37, 209, 185, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

.success-icon i {
    width: 40px;
    height: 40px;
}

.success-message h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.success-message p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex; /* Always flex */
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden; /* Use visibility instead of display:none */
    pointer-events: none;
    transition: all 0.4s ease;
}

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

.modal-content {
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden; /* Prevent scrollbar on the modal container itself due to borders */
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(10, 12, 16, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 0 !important; /* Ensure image can touch edges */
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    padding: 3rem;
    overflow-y: auto; /* Handle scrolling inside the body */
    max-height: calc(90vh - 2px); /* Allow it to take full height of modal content minus borders */
}

.modal-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: 20px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-list {
    list-style: none;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-list li {
    display: flex;
    gap: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-list li i {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 3px;
}

.partners-modal {
    max-width: 1080px;
    border-color: rgba(37, 209, 185, 0.65);
}

.partners-modal-body {
    grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.2fr);
    align-items: center;
    gap: 3rem;
}

.partners-intro p {
    color: var(--text-muted);
    line-height: 1.75;
}

.partners-media {
    min-width: 0;
}

.partners-marquee {
    width: 100%;
    overflow: hidden;
    margin-top: 1.1rem;
    padding: 0.65rem 0;
    color: var(--primary);
    white-space: nowrap;
    background: transparent;
    border-top: 1px solid rgba(37, 209, 185, 0.18);
    border-bottom: 1px solid rgba(37, 209, 185, 0.18);
}

.partners-marquee span {
    display: inline-block;
    min-width: 100%;
    padding-left: 100%;
    font-weight: 700;
    letter-spacing: 0;
    animation: partnersMarquee 16s linear infinite;
}

@keyframes partnersMarquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.partner-card {
    overflow: hidden;
    border: 1px solid rgba(37, 209, 185, 0.25);
    border-radius: 24px;
    background: rgba(10, 28, 24, 0.88);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.partner-photo {
    width: 100%;
    height: 248px;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.04);
}

.partner-info {
    padding: 1.25rem;
    display: flex;
    flex: 1;
    flex-direction: column;
    position: relative;
}

.partner-info h3 {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.partner-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    padding-right: 2.25rem;
}

.partner-linkedin {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    margin-top: auto;
    color: var(--primary);
    border: 1px solid rgba(37, 209, 185, 0.55);
    border-radius: 7px;
    background: rgba(5, 7, 10, 0.65);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.partner-linkedin:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(37, 209, 185, 0.12);
    box-shadow: 0 0 20px rgba(37, 209, 185, 0.2);
    transform: translateY(-2px);
}

.partner-linkedin svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
    }

    .modal-content {
        max-height: 85vh;
        border-radius: 24px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        padding: 0; /* Remove padding to let image touch edges */
        gap: 0;
        max-height: calc(85vh - 2px); /* Allow it to take full height of modal content on mobile minus borders */
    }

    .modal-image {
        min-height: 250px;
        border-radius: 24px 24px 0 0; /* Match card radius at top */
        width: 100%;
    }

    .modal-image img {
        width: 100%;
        height: 100%;
    }

    .modal-text {
        padding: 2rem 1.5rem; /* Re-add padding to text only */
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        background: rgba(0, 0, 0, 0.5); /* Better contrast over image */
    }

    .modal-list li {
        font-size: 0.9rem;
    }

    .partners-modal-body {
        grid-template-columns: 1fr;
        padding: 2rem 1.25rem;
        gap: 1.5rem;
    }

    .partners-intro {
        padding: 0;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }

    .partner-photo {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .partner-info {
        padding: 1rem;
    }
}
