@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    /* Colors - Brand Official */
    --primary: #133A59;
    --primary-light: #1e5a8a;
    --primary-dark: #0c2640;
    --accent: #4D4D4D;
    --accent-hover: #333333;
    --accent-silver: #999999;
    --text-dark: #133A59;
    --text-light: #4D4D4D;
    --bg-light: #f4f7f9;
    --white: #ffffff;
    --border: #d1d9e0;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.12);
    --ribbon-shadow: 0 4px 20px rgba(0,0,0,0.1);
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

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

.section {
    padding: 100px 0;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* =========================================
   HEADER & NAV - White Ribbon Style
   ========================================= */
header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    background: var(--white);
    padding: 0.2rem 0;
    border-radius: 50px;
    box-shadow: var(--ribbon-shadow);
    transition: var(--transition);
}

header.scrolled {
    top: 10px;
    width: 95%;
    padding: 0.2rem 0;
}

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

/* Logo sizes are now handled in .logo-container */

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

.nav-links a {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

.mobile-menu-btn {
    display: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Logo Style and Animation */
.logo-container {
    height: 120px;
    position: relative;
    display: inline-block;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

header.scrolled .logo-container {
    height: 80px;
}

.logo-container img {
    height: 100%;
    display: block;
    position: relative;
    z-index: 1;
}

/* Shine effect */
.logo-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: 2;
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* =========================================
   FLOATING SOCIAL MEDIA - Right Side
   ========================================= */
.social-floating {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.social-floating a {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    font-size: 1.2rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
}

.social-floating a:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1) translateX(-5px);
}

/* =========================================
   HERO SLIDER - Full Screen
   ========================================= */
.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
    width: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(19, 58, 89, 0.55) 0%,
        rgba(19, 58, 89, 0.45) 50%,
        rgba(19, 58, 89, 0.65) 100%
    );
}

.hero-slider .container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

/* Hero Content - White text with Navy Blue outlines */
.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 5;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 1px;
    /* Navy blue outline (ribete azul marino) */
    text-shadow: 
        -2px -2px 0 var(--primary),  
         2px -2px 0 var(--primary),
        -2px  2px 0 var(--primary),
         2px  2px 0 var(--primary),
         0px  0px 8px rgba(19, 58, 89, 0.6),
         0px  4px 15px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--white);
    text-shadow:
        -1px -1px 0 var(--primary),
         1px -1px 0 var(--primary),
        -1px  1px 0 var(--primary),
         1px  1px 0 var(--primary),
         0px 2px 8px rgba(0,0,0,0.3);
    font-weight: 400;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img {
    position: relative;
}

.about-img img {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.about-tag {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--accent);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    z-index: 5;
}

.about-tag span {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}

/* Brand Logo Slideshow - Nosotros Section */
.brand-slideshow {
    position: relative;
    width: 100%;
    min-height: 350px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    padding: 2rem;
}

.brand-slide.active {
    opacity: 1;
    transform: scale(1);
}

.brand-slide img {
    max-width: 85%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
}

/* Navigation Dots */
.brand-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(19, 58, 89, 0.25);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.brand-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.brand-dot:hover {
    background: var(--primary-light);
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.services {
    background-color: var(--bg-light);
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.service-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.8s ease-in-out;
}

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

.service-slider .service-slide {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 1;
}

.service-slider .service-slide.active {
    opacity: 1;
    z-index: 2;
}

.service-info {
    padding: 2rem;
}

.service-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

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

/* =========================================
   CLIENTS SECTION - Infinite Carousel
   ========================================= */
.clients-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 2rem 0;
    /* Fade edges for premium look */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.clients-grid {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: scrollClients 30s linear infinite;
}

.clients-grid:hover {
    animation-play-state: paused;
}

.client-logo-box {
    width: 500px;
    min-width: 500px;
    height: 250px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: var(--transition);
}

.client-logo {
    width: 500px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: none;
    opacity: 1;
}

.client-logo-box:hover .client-logo {
    transform: scale(1.15);
}

@keyframes scrollClients {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1.5rem)); } /* -50% to show second half seamlessly */
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-card {
    background: var(--primary);
    color: var(--white);
    padding: 3rem;
    border-radius: 12px;
}

.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-silver);
}

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(19, 58, 89, 0.1);
}

/* Contact form status messages */
.form-status {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: inline-block;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    width: 300px;
    max-width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* Shine effect for footer logo */
.footer-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: 2;
    animation: shine 5s infinite;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--accent-silver);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 3rem; }
    .about-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .services-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 2rem;
        border-radius: 0 0 20px 20px;
        box-shadow: var(--shadow-lg);
        text-align: center;
    }
    
    .nav-links.show {
        display: flex;
    }

    .mobile-menu-btn { display: block; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1rem; }
    .hero-btns { flex-direction: column; gap: 1rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .social-floating { display: none; }
    .client-logo-box { width: 160px; min-width: 160px; height: 90px; }
    
    /* Logo responsive */
    .logo img { height: 55px; }
    .logo-container { height: 55px; }
    header.scrolled .logo img { height: 45px; }
    header.scrolled .logo-container { height: 45px; }
    header { width: 95%; top: 10px; padding: 0.5rem 0; }
    
    /* Brand slideshow responsive */
    .brand-slideshow { min-height: 250px; }
    .brand-slide img { max-height: 180px; }
    
    /* About tag responsive */
    .about-tag {
        bottom: -10px;
        right: -10px;
        padding: 1rem;
    }
    .about-tag span { font-size: 1.5rem; }
    
    /* Contact card responsive */
    .contact-info-card { padding: 2rem; }
    .contact-form { padding: 2rem; }
    
    /* Service cards responsive */
    .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.8rem; }
    .container { padding: 0 1rem; }
    .brand-slideshow { min-height: 200px; }
    .brand-slide img { max-height: 140px; max-width: 90%; }
    .brand-slide { padding: 1.5rem; }
    .logo img { height: 45px; }
    .logo-container { height: 45px; }
    .section-header h2 { font-size: 1.8rem; }
    .about-content h2 { font-size: 1.8rem !important; }
}
