/* =========================================
   RAYFRASUR — INDUSTRIAL THEME
   ========================================= */
:root {
    --color-dark:         #0e0e0e;
    --color-steel:        #1a1c1e;
    --color-steel-mid:    #2a2d30;
    --color-primary:      #960000;
    --color-primary-dark: #6e0000;
    --color-accent:       #c8b97a;   /* brass/gold — industrial hardware */
    --color-light:        #ffffff;
    --color-concrete:     #edecea;   /* raw concrete, not clinical gray */
    --color-text:         #2e2e2e;
    --color-text-muted:   #5a5a5a;

    --shadow-sm:    0 2px 6px rgba(0,0,0,0.12);
    --shadow-md:    0 8px 24px rgba(0,0,0,0.18);
    --shadow-heavy: 0 20px 48px rgba(0,0,0,0.30);

    --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --transition: all 0.25s ease;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    font-family: var(--font-stack);
    color: var(--color-text);
    line-height: 1.65;
    background-color: var(--color-light);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { color: inherit; }

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

.section { padding: 6rem 0; }

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

/* ---- TIPOGRAFÍA COMÚN ---- */
.eyebrow-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 900;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-title.text-left { text-align: left; }

.title-separator {
    width: 48px;
    height: 4px;
    background-color: var(--color-primary);
    margin: 0 auto 1.5rem;
}
.title-separator.left { margin-left: 0; }

.section-desc {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ---- BOTONES ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    font-weight: 800;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 0;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-light);
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-ghost {
    background-color: transparent;
    border-color: rgba(255,255,255,0.55);
    color: var(--color-light);
}
.btn-ghost:hover {
    background-color: rgba(255,255,255,0.12);
    border-color: var(--color-light);
}

.btn-large  { padding: 1.05rem 2.5rem; }
.btn-full   { width: 100%; }

/* ============================
   HEADER
   ============================ */
.header {
    background-color: rgba(255,255,255,0.97);
    border-bottom: 3px solid var(--color-primary);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 88px;
    transition: height 0.25s ease;
    position: relative;
}

.header.scrolled .header-container { height: 72px; }

/* Footer variant — Placa corporativa más grande y legible */
.footer-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background-color: #ffffff; 
    padding: 0.75rem 1.5rem;   /* Más aire a los lados para equilibrar el tamaño */
    border-radius: 6px;        /* Bordes un pelín más suaves */
    opacity: 1;                
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.footer-logo-link:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 6px 16px rgba(0,0,0,0.4); /* Sombra un poco más amplia al hacer hover */
}

.footer-logo-img {
    height: 55px; /* <-- Subimos de 35px a 55px para ganar presencia */
    width: auto;
    display: block;
}
.header.scrolled .logo-img {
    height: 64px;
}

/* Footer variant — Placa corporativa para logos con fondo blanco */
.footer-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background-color: #ffffff; /* Fondo blanco limpio y sólido */
    padding: 0.6rem 1.25rem;   /* Espacio/aire alrededor del logo */
    border-radius: 4px;        /* Bordes ligeramente redondeados */
    opacity: 1;                /* Opacidad al 100% para evitar el efecto sucio */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.footer-logo-link:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.footer-logo-img {
    height: 64px;
    width: auto;
    display: block;
}

/* MOBILE TOGGLE */
.mobile-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--color-dark);
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    z-index: 1001;
}

/* MAIN NAV — mobile default */
.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-light);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-heavy);
    border-top: 1px solid #ddd;
}
.main-nav.active { display: flex; }

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--color-primary); }

.nav-cta {
    width: 100%;
    text-align: center;
}

/* ============================
   HERO
   ============================ */
.premium-hero {
    margin-top: 88px;
    position: relative;
    background-color: var(--color-dark);
    background-image: url('recursos/imagen1.jpeg');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    color: var(--color-light);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Layered overlay: gradient left + dark veil */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(10,10,10,0.88) 0%,
        rgba(14,14,14,0.65) 55%,
        rgba(14,14,14,0.30) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 5rem 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--color-accent);
    border-left: 3px solid var(--color-accent);
    padding-left: 0.75rem;
    margin-bottom: 1.75rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.0;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    /* Subtle text shadow for readability on photo */
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: #c8cdd4;
    max-width: 540px;
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Bottom ticker strip */
.hero-strip {
    position: relative;
    z-index: 2;
    background-color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
    text-align: center;
}
.strip-sep { color: rgba(255,255,255,0.35); }

/* ============================
   SERVICIOS
   ============================ */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background-color: var(--color-light);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border-bottom: 4px solid var(--color-primary);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.service-card .card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--color-steel);
}

.service-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease, filter 0.3s ease;
    filter: saturate(0.85) contrast(1.05);
}
.service-card:hover .card-image img {
    transform: scale(1.05);
    filter: saturate(1) contrast(1);
}

/* Number tag */
.card-num {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--color-primary);
    color: var(--color-light);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 0.4rem 0.75rem;
    line-height: 1;
}

.card-content { padding: 2rem 1.75rem; }

.service-title {
    color: var(--color-dark);
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.75rem;
}

.service-desc {
    color: var(--color-text-muted);
    font-size: 0.97rem;
    line-height: 1.65;
}

/* ============================
   NOSOTROS
   ============================ */
.about-section { background-color: var(--color-light); }

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

/* Image composition: main + floating accent */
.about-images {
    position: relative;
    /* Reserve space for the floating accent */
    padding-bottom: 3.5rem;
}

.about-img-main {
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

.about-img-main img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: saturate(0.85);
    transition: filter 0.3s;
}
.about-img-main:hover img { filter: saturate(1); }

.about-img-accent {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 55%;
    box-shadow: var(--shadow-heavy);
    border: 4px solid var(--color-light);
    background-color: var(--color-steel);
    overflow: hidden;
}

.about-img-accent img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: saturate(0.7);
    display: block;
}

/* Years badge */
.about-badge {
    position: absolute;
    top: 0;
    left: -2px;
    background-color: var(--color-primary);
    color: var(--color-light);
    padding: 0.75rem 1rem;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-num {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.badge-text {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* About text */
.about-text p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.about-text p strong { color: var(--color-dark); }

.about-stats {
    margin-top: 2rem;
    background-color: var(--color-steel);
    color: var(--color-light);
    padding: 2rem 2rem 2rem 2.5rem;
    border-left: 5px solid var(--color-primary);
}

.about-stats h3 {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.check-list { list-style: none; }

.check-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #d0d4d8;
}
.check-list li:last-child { margin-bottom: 0; }

.check-list svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

/* ============================
   CONTACTO
   ============================ */
.contact-section { }

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

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-bottom: 1.75rem;
}

.contact-row svg { flex-shrink: 0; margin-top: 2px; }

.contact-row p {
    margin: 0;
    font-weight: 600;
    font-size: 0.97rem;
    color: var(--color-dark);
    line-height: 1.7;
}

.contact-row a {
    text-decoration: none;
    transition: color 0.2s;
}
.contact-row a:hover { color: var(--color-primary); }

/* Form */
.modern-form {
    background: var(--color-light);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-heavy);
    border-top: 5px solid var(--color-steel);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background-color: #f5f5f4;
    border: 2px solid transparent;
    border-bottom-color: #c4c4c4;
    font-family: inherit;
    font-size: 0.97rem;
    color: var(--color-text);
    transition: all 0.25s ease;
    border-radius: 0;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background-color: #fff;
    border-bottom-color: var(--color-primary);
}

.form-feedback {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    display: none;
    font-size: 0.9rem;
    font-weight: 600;
}
.form-feedback.error {
    display: block;
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #991b1b;
}
.form-feedback.success {
    display: block;
    background-color: #f0fdf4;
    color: #166534;
    border-left: 4px solid #166534;
}

/* ============================
   FOOTER
   ============================ */
.footer {
    background-color: var(--color-steel);
    padding: 3.5rem 0 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.footer-content p { margin-bottom: 0.5rem; }

.footer-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-credit-link {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}
.footer-credit-link:hover { color: var(--color-accent); }

/* ============================
   MOBILE ADJUSTMENTS
   ============================ */
body.menu-open { overflow: hidden; }

@media (max-width: 767px) {
    .section { padding: 4rem 0; }
    .hero-content { padding: 4rem 1.5rem 3rem; }

    .hero-strip {
        justify-content: center;
        text-align: center;
    }

    .section-title { font-size: 1.65rem; }
    .section-header { margin-bottom: 2.5rem; }

    .card-content { padding: 1.5rem 1.25rem; }

    .service-card:hover { transform: none; }

    .about-images { padding-bottom: 4rem; }
    .about-img-accent { width: 50%; }

    .contact-row { flex-wrap: wrap; }

    .modern-form { padding: 2rem 1.25rem; }

    .btn-large { width: 100%; text-align: center; }
}

/* ============================
   REDUCED MOTION
   ============================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================
   DESKTOP
   ============================ */
@media (min-width: 768px) {
    .mobile-toggle { display: none; }

    .main-nav {
        display: flex;
        position: static;
        flex-direction: row;
        width: auto;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
        border: none;
        align-items: center;
        gap: 2.5rem;
    }

    .nav-list {
        flex-direction: row;
        margin-bottom: 0;
        gap: 2rem;
    }

    .nav-cta { width: auto; }

    .hero-content { padding: 8rem 1.5rem 6rem; }
    .premium-hero {
        background-attachment: fixed;
        min-height: 88vh;
    }
    .hero-actions { flex-direction: row; }

    .services-grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }

    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
        align-items: center;
    }

    .about-images { padding-bottom: 5rem; }

    .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }

    .modern-form { padding: 3rem; }
}

/* Tablet: 2-col services, last card centred */
@media (min-width: 768px) and (max-width: 1023px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid .service-card:last-child {
        grid-column: 1 / -1;
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }
}
