/* =============================================
   COARSA S.A. — Shared Stylesheet
   Usado en todas las páginas del sitio
============================================= */
:root {
    --color-primary: #1a3a5c;
    --color-primary-dark: #0f2540;
    --color-primary-light: #2a5a8c;
    --color-accent: #4b5563;
    --color-accent-dark: #374151;
    --color-accent-light: #6b7280;
    --color-gray-100: #f8f9fa;
    --color-gray-200: #e9ecef;
    --color-gray-300: #dee2e6;
    --color-gray-500: #6c757d;
    --color-gray-700: #495057;
    --color-gray-900: #212529;
    --color-white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.18);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 80px;
}
*, *::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(--color-gray-700); background: var(--color-white); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* UTILITIES */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-tag { display: inline-block; font-family: var(--font-heading); font-size: 0.7rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--color-accent); margin-bottom: 16px; }
.section-title { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: var(--color-primary); line-height: 1.2; margin-bottom: 20px; }
.section-title span { color: var(--color-accent); }
.section-subtitle { font-size: 1.05rem; color: var(--color-gray-500); max-width: 580px; line-height: 1.8; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; font-family: var(--font-heading); font-size: 0.85rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; border-radius: var(--radius-sm); transition: var(--transition); cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--color-accent); color: var(--color-white); }
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(75,85,99,0.4); }
.btn-outline { background: transparent; color: var(--color-white); border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: var(--color-white); color: var(--color-primary); border-color: var(--color-white); }
.btn-dark { background: var(--color-primary); color: var(--color-white); }
.btn-dark:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,58,92,0.4); }

/* NAVBAR */
.navbar { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); z-index: 1000; transition: var(--transition); display: flex; align-items: center; background: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.navbar.transparent { background: transparent; box-shadow: none; }
.navbar.scrolled { background: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { height: 44px; width: auto; }
.nav-logo-text { font-family: var(--font-heading); }
.nav-logo-name { display: block; font-size: 1.1rem; font-weight: 800; color: var(--color-white); letter-spacing: 2px; }
.nav-logo-tagline { display: block; font-size: 0.62rem; color: rgba(255,255,255,0.55); letter-spacing: 1px; text-transform: uppercase; }
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-link { font-family: var(--font-heading); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.5px; color: rgba(255,255,255,0.85); padding: 8px 16px; border-radius: var(--radius-sm); transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--color-white); background: rgba(255,255,255,0.1); }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.nav-dropdown-toggle::after { content: ''; width: 8px; height: 5px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 5'%3E%3Cpath fill='rgba(255,255,255,0.8)' d='M0 0l4 5 4-5z'/%3E%3C/svg%3E") no-repeat center; transition: var(--transition); }
.nav-dropdown:hover .nav-dropdown-toggle::after { transform: rotate(180deg); }
.nav-dropdown-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; background: var(--color-white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: var(--transition); }
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); font-family: var(--font-heading); font-size: 0.82rem; font-weight: 500; color: var(--color-gray-700); transition: var(--transition); }
.nav-dropdown-item:hover { background: var(--color-gray-100); color: var(--color-primary); }
.nav-dropdown-dot { width: 6px; height: 6px; background: var(--color-accent); border-radius: 50%; flex-shrink: 0; }
.nav-cta { margin-left: 8px; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger-line { width: 26px; height: 2px; background: var(--color-white); border-radius: 2px; transition: var(--transition); }
.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; position: fixed; top: var(--nav-height); left: 0; right: 0; background: var(--color-primary-dark); padding: 24px; flex-direction: column; gap: 8px; box-shadow: var(--shadow-lg); z-index: 999; }
.mobile-menu.open { display: flex; }
.mobile-link { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.85); padding: 12px 16px; border-radius: var(--radius-sm); transition: var(--transition); }
.mobile-link:hover { background: rgba(255,255,255,0.1); color: var(--color-white); }
.mobile-submenu { padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.mobile-sublabel { font-family: var(--font-heading); font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.4); padding: 8px 16px 4px; }

/* PAGE HERO (subpages) */
.page-hero { height: 420px; position: relative; display: flex; align-items: flex-end; padding-bottom: 60px; background-size: cover; background-position: center; margin-top: var(--nav-height); overflow: hidden; }
.page-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; }
.page-hero-overlay { position: absolute; inset: 0; z-index: 1; }
.page-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(10,30,53,0.88) 0%, rgba(10,30,53,0.55) 60%, rgba(10,30,53,0.3) 100%); }
.page-hero-content { position: relative; z-index: 2; }
.page-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.page-breadcrumb a, .page-breadcrumb span { font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.65); transition: var(--transition); }
.page-breadcrumb a:hover { color: rgba(255,255,255,1); }
.page-breadcrumb-sep { color: rgba(255,255,255,0.3); font-size: 0.7rem; }
.page-breadcrumb .current { color: rgba(255,255,255,1); font-weight: 700; }
.page-title { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; color: var(--color-white); line-height: 1.1; margin-bottom: 16px; }
.page-subtitle { font-size: 1.05rem; color: rgba(255,255,255,0.72); max-width: 560px; line-height: 1.7; }

/* CONTENT SECTIONS */
.content-section { padding: 90px 0; }
.content-section.bg-light { background: var(--color-gray-100); }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: stretch; }
.content-grid.reverse { direction: rtl; }
.content-grid.reverse > * { direction: ltr; }
.content-img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.content-text p { color: var(--color-gray-500); line-height: 1.9; margin-bottom: 20px; }
.content-text p:last-child { margin-bottom: 0; }

/* GALLERY */
.gallery { padding: 80px 0; background: var(--color-primary-dark); }
.gallery-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--color-white); text-align: center; margin-bottom: 36px; letter-spacing: 2px; text-transform: uppercase; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 260px;
    gap: 12px;
}
.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    /* sin aspect-ratio: grid-auto-rows controla la altura de forma uniforme */
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item.wide { grid-column: span 2; }
.gallery-item.full { grid-column: 1 / -1; }  /* ocupa las 3 columnas */

/* FEATURE LIST */
.feature-list { display: flex; flex-direction: column; gap: 16px; margin: 28px 0; }
.feature-item { display: flex; align-items: flex-start; gap: 14px; padding: 18px; background: var(--color-gray-100); border-radius: var(--radius-md); border-left: 3px solid var(--color-accent); transition: var(--transition); }
.feature-item:hover { background: var(--color-white); box-shadow: var(--shadow-sm); }
.feature-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.feature-title { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; color: var(--color-primary); margin-bottom: 4px; }
.feature-desc { font-size: 0.85rem; color: var(--color-gray-500); line-height: 1.6; }

/* STATS BAR */
.stats-bar { background: var(--color-accent); padding: 50px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-number { font-family: var(--font-heading); font-size: 2.4rem; font-weight: 800; color: var(--color-white); line-height: 1; }
.stat-label { font-family: var(--font-heading); font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-top: 6px; }

/* CTA SECTION */
.cta-section { padding: 90px 0; background: var(--color-primary); text-align: center; }
.cta-title { font-family: var(--font-heading); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; color: var(--color-white); margin-bottom: 16px; }
.cta-subtitle { font-size: 1rem; color: rgba(255,255,255,0.65); margin-bottom: 36px; }
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* RELATED SERVICES */
.related { padding: 80px 0; background: var(--color-gray-100); }
.related-title { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; text-align: center; color: var(--color-gray-700); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 40px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.related-card { background: var(--color-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); display: block; }
.related-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.related-card-img { height: 180px; background-size: cover; background-position: center; position: relative; }
.related-card-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(15,37,64,0.7)); }
.related-card-body { padding: 20px; }
.related-card-tag { font-family: var(--font-heading); font-size: 0.68rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--color-accent); margin-bottom: 6px; }
.related-card-title { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--color-primary); }

/* FOOTER */
.footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.7); padding: 70px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; margin-bottom: 60px; }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-logo img { height: 44px; width: auto; }
.footer-logo-name { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; color: var(--color-white); letter-spacing: 2px; }
.footer-desc { font-size: 0.88rem; line-height: 1.8; max-width: 280px; margin-bottom: 24px; }
.footer-since { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.85); font-family: var(--font-heading); font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; padding: 6px 14px; border-radius: 50px; }
.footer-col-title { font-family: var(--font-heading); font-size: 0.78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--color-white); margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 0.88rem; color: rgba(255,255,255,0.55); transition: var(--transition); display: flex; align-items: center; gap: 8px; }
.footer-link:hover { color: var(--color-white); padding-left: 6px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.footer-contact-icon { font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.footer-contact-text { font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.5; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 28px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-copyright { font-size: 0.82rem; color: rgba(255,255,255,0.35); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 0.82rem; color: rgba(255,255,255,0.35); transition: var(--transition); }
.footer-legal a:hover { color: rgba(255,255,255,0.7); }

/* REVEAL ANIMATION */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .content-section { padding: 70px 0; }
    .content-grid { gap: 40px; }
    .gallery { padding: 60px 0; }
}
@media (max-width: 768px) {
    body, html { overflow-x: hidden; }
    .nav-menu { display: none !important; }
    .hamburger { display: flex !important; background: rgba(10,30,53,0.85); border-radius: 8px; padding: 10px; }
    .navbar { background: var(--color-primary-dark) !important; box-shadow: var(--shadow-md) !important; }

    /* Hero subpages */
    .page-hero { height: auto; min-height: 260px; padding-bottom: 36px; padding-top: calc(var(--nav-height) + 24px); }
    .page-hero-content { max-width: 100% !important; margin-left: 0 !important; padding: 0 20px; }
    .page-hero-overlay { background: linear-gradient(to bottom, rgba(10,30,53,0.3) 0%, rgba(10,30,53,0.65) 100%) !important; }
    .page-title { font-size: clamp(1.5rem, 6vw, 2.2rem); }
    .page-subtitle { font-size: 0.9rem; }
    .page-breadcrumb { display: none; }

    /* Content */
    .content-grid { grid-template-columns: 1fr; gap: 28px; }
    .content-grid.reverse { direction: ltr; }
    .content-img { min-height: 240px; max-height: 320px; }
    .content-section { padding: 48px 0; }

    /* Feature list */
    .feature-list { gap: 10px; margin: 16px 0; }
    .feature-item { padding: 14px; gap: 10px; }

    /* Gallery */
    .gallery { padding: 48px 0; }
    .gallery-title { font-size: 0.9rem; letter-spacing: 1.5px; margin-bottom: 20px; }
    .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; }
    .gallery-grid[style] { grid-template-columns: 1fr !important; }
    .gallery-item.wide { grid-column: span 2; }
    .gallery-item.full { grid-column: span 2; }

    /* Related */
    .related { padding: 48px 0; }
    .related-grid { grid-template-columns: 1fr; }
    .related-card-img { height: 160px; }

    /* Footer / CTA */
    .footer { padding: 48px 0 24px; }
    .footer-grid { grid-template-columns: 1fr !important; gap: 28px !important; margin-bottom: 36px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 12px; }
    .cta-actions { flex-direction: column; align-items: center; }
    .cta-section { padding: 48px 0; }
    .cta-title { font-size: clamp(1.3rem, 5vw, 1.8rem); }

    /* Stats */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; max-width: 100% !important; gap: 16px; }
    .stats-bar { padding: 28px 0; }
    .stat-number { font-size: 1.8rem; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
    .gallery-item.wide, .gallery-item.full { grid-column: span 1; }
    .gallery { padding: 36px 0; }
    .gallery-title { font-size: 0.82rem; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 12px; }
    .stats-bar { padding: 24px 0; }
    .stat-number { font-size: 1.6rem; }
    .page-hero { min-height: 220px; }
    .content-section { padding: 36px 0; }
    .content-img { min-height: 200px; max-height: 260px; }
    .feature-item { padding: 12px; }
    .cta-section { padding: 36px 0; }
    .related { padding: 36px 0; }
    .btn { padding: 12px 24px; font-size: 0.8rem; }
}
