/* ============================================
   FORDEMA — Estilos Globales + Index
   Paleta: #3b6fa0 (azul), #ecb94a (naranja),
           #a8c528 (verde), #1a2d42 (oscuro),
           #333 (texto), #fff, #f5f5f5
   Fuentes: Raleway (titulos), Open Sans (cuerpo)
   ============================================ */

/* --- CSS CUSTOM PROPERTIES --- */
:root {
    --color-blue: #3b6fa0;
    --color-orange: #ecb94a;
    --color-green: #a8c528;
    --color-dark: #1a2d42;
    --color-text: #333;
    --color-bg: #fff;
    --color-bg-light: #f5f5f5;
    --font-heading: 'Raleway', Arial, sans-serif;
    --font-body: 'Open Sans', Arial, sans-serif;
    --bp-tablet: 1024px;
    --bp-mobile: 768px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    color: #333;
    background-color: #fff;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- ACCESIBILIDAD --- */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #3b6fa0;
    color: #fff;
    padding: 10px 20px;
    z-index: 10000;
    border-radius: 0 0 5px 5px;
    font-weight: 600;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

*:focus-visible {
    outline: 3px solid #3b6fa0;
    outline-offset: 2px;
}

/* Alertas globales */
.alert {
    padding: 15px 20px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 600;
}

/* --- HEADER --- */
header {
    background: #fff;
    color: #333;
    padding: 20px 30px;
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(to right, #3b6fa0, #a8c528, #ecb94a) 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    z-index: 100;
}

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

.logo img {
    height: 50px;
    width: auto;
}

/* --- NAV --- */
nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    padding: 15px 22px;
    display: block;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 500;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 3px solid transparent;
    transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: #3b6fa0;
    border-top-color: #3b6fa0;
}

/* --- SUBMENU --- */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    z-index: 200;
    border-top: 3px solid #3b6fa0;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li a {
    padding: 12px 20px;
    font-size: 0.88em;
    text-transform: none;
    border-top: none;
    border-bottom: 1px solid #f0f0f0;
}

.submenu li a:hover {
    background-color: #f5f5f5;
    color: #3b6fa0;
}

/* --- SUBMENU TOGGLE ARROW (mobile) --- */
.submenu-toggle {
    display: none;
}

/* --- HAMBURGER --- */
.hamburger {
    display: none;
    background: #1a2d42;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 3px;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- HERO SECTION --- */
#inicio {
    position: relative;
    height: 85vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    background-color: #f0f2f5;
}

#inicio .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

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

.hero-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

#inicio .contenido {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 700px;
}

#inicio .contenido img {
    max-width: 750px;
    margin: 0 auto 25px auto;
}

#inicio .contenido h2 {
    font-size: 3em;
    font-weight: 300;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

#inicio .contenido h3 {
    font-size: 1.3em;
    font-weight: 300;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    color: rgba(255,255,255,0.85);
}

#inicio .contenido p {
    font-size: 1.05em;
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

/* --- HERO TEXTO (debajo de la imagen) --- */
.hero-texto {
    text-align: center;
    padding: 60px 30px;
    background-color: #fff;
    max-width: 800px;
    margin: 0 auto;
}

.hero-texto h2 {
    font-size: 2.5em;
    font-weight: 300;
    color: #333;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hero-texto h3 {
    font-size: 1.2em;
    font-weight: 400;
    color: #ecb94a;
    margin-bottom: 20px;
}

.hero-texto p {
    font-size: 1.05em;
    line-height: 1.8;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* --- AFTER HERO TEXT --- */
.after-hero-text {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 30px;
    font-size: 1.05em;
    line-height: 1.8;
    color: #555;
    text-align: center;
}

/* --- INFO SECTIONS (Servicios) --- */
#servicios {
    background-color: #f8f9fa;
    padding: 80px 5%;
}

#servicios .section-heading {
    text-align: center;
    color: #3b6fa0;
    font-size: 2em;
    font-weight: 300;
    margin-bottom: 60px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.info-sections-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-section {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.info-sections-container .info-section:nth-child(even) {
    margin-top: 0;
}

.info-section-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 50px;
}

.vertical-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: #3b6fa0;
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.info-section-left .decorative-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, #a8c528, #3b6fa0, transparent);
}

.info-section-middle {
    flex: 1;
    display: flex;
    align-items: center;
}

.info-section-middle p {
    color: #555;
    font-size: 0.9em;
    line-height: 1.8;
}

.info-section-right {
    width: 180px;
    min-width: 180px;
    overflow: hidden;
}

.info-section-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.info-section:hover .info-section-right img {
    filter: brightness(1);
    transform: scale(1.05);
}

/* --- IMAGE LINKS SECTION (Nosotros / Galeria) --- */
.image-links-section {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    width: 100%;
}

.link-item {
    position: relative;
    flex: 1;
    height: 28vw;
    min-height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.link-item .bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.link-item:hover .bg-image {
    filter: brightness(0.55);
    transform: scale(1.05);
}

.link-item .overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.link-item .overlay h3 {
    font-size: 1.8em;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.link-item .overlay .btn {
    display: inline-block;
    padding: 12px 35px;
    border: 2px solid #fff;
    color: #fff;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.link-item .overlay .btn:hover {
    background-color: #ecb94a;
    border-color: #ecb94a;
    color: #fff;
}

/* --- ACHOIAR HIGHLIGHT --- */
.achoiar-highlight {
    background: linear-gradient(135deg, #1a2d42 0%, #243b53 100%);
    padding: 70px 5%;
}

.achoiar-highlight-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 50px;
}

.achoiar-info {
    flex: 1;
    color: #fff;
}


.achoiar-info h2 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 2.6em;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.achoiar-info h3 {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 1.15em;
    font-weight: 300;
    color: #ecb94a;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.achoiar-info p {
    font-size: 1em;
    line-height: 1.7;
    color: #c0cdd9;
    margin-bottom: 22px;
}

.achoiar-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.achoiar-features span {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e8ef;
    font-size: 0.8em;
    padding: 10px 12px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.achoiar-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.achoiar-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-family: 'Raleway', Arial, sans-serif;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.achoiar-btn.primary {
    background: #ecb94a;
    color: #1a2d42;
}

.achoiar-btn.primary:hover {
    background: #d4a53e;
    transform: translateY(-2px);
}

.achoiar-btn.secondary {
    background: transparent;
    color: #ecb94a;
    border: 1px solid #ecb94a;
}

.achoiar-btn.secondary:hover {
    background: rgba(236, 185, 74, 0.1);
    transform: translateY(-2px);
}

.achoiar-capabilities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 28px;
}

.capability-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 18px;
}

.capability-item h4 {
    font-size: 0.95em;
    font-weight: 700;
    color: #ecb94a;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.capability-item ul {
    list-style: none;
    padding: 0;
}

.capability-item li {
    font-size: 0.82em;
    color: #c0cdd9;
    padding: 5px 0;
    line-height: 1.5;
}

.capability-item li:before {
    content: '✓ ';
    color: #a8c528;
    font-weight: bold;
    margin-right: 6px;
}

.achoiar-gallery {
    flex: 0.9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-main {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.35);
    background: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

.gallery-main img {
    max-width: 100%;
    max-height: 390px;
    display: block;
    width: auto;
    height: auto;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    justify-content: flex-start;
}

.gallery-thumb {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    object-fit: cover;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.active {
    border-color: #ecb94a;
    opacity: 1;
}

@media (max-width: 1024px) {
    .achoiar-highlight-inner {
        gap: 35px;
    }

    .achoiar-info h2 {
        font-size: 2.1em;
    }

    .achoiar-capabilities {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .achoiar-highlight {
        padding: 50px 20px;
    }

    .achoiar-highlight-inner {
        flex-direction: column;
        gap: 30px;
    }

    .achoiar-info h2 {
        font-size: 2em;
    }

    .achoiar-capabilities {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .achoiar-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .achoiar-buttons {
        flex-direction: column;
    }

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

    .gallery-main {
        min-height: 340px;
    }

    .gallery-main img {
        max-height: 310px;
    }

    .gallery-thumb {
        width: 45px;
        height: 45px;
    }
}

/* --- CONTACT SECTION (Parallax) --- */
#contacto-home {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 5%;
    color: #fff;
}

#contacto-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 0;
}

#contacto-home > * {
    position: relative;
    z-index: 1;
}

#contacto-home .section-title {
    text-align: center;
    font-size: 2em;
    font-weight: 300;
    color: #fff;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.contact-content {
    display: flex;
    gap: 50px;
    max-width: 900px;
    margin: 0 auto;
    align-items: flex-start;
}

.contact-content form {
    flex: 1;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row input {
    flex: 1;
}

#contacto-home input[type="text"],
#contacto-home input[type="email"],
#contacto-home textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    background-color: rgba(255,255,255,0.95);
    color: #333;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 0.95em;
    margin-bottom: 15px;
}

#contacto-home input::placeholder,
#contacto-home textarea::placeholder {
    color: #999;
}

#contacto-home textarea {
    min-height: 120px;
    resize: vertical;
}

#contacto-home button[type="submit"] {
    background-color: #3b6fa0;
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#contacto-home button[type="submit"]:hover {
    background-color: #2d5a84;
    color: #fff;
}

.form-footer {
    text-align: right;
}

.contact-info-side {
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 10px;
}

.contact-info-side p {
    font-size: 0.95em;
    line-height: 1.7;
    color: #ccc;
}

.contact-info-side strong {
    color: #ecb94a;
    display: block;
    margin-bottom: 5px;
    font-family: 'Raleway', Arial, sans-serif;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
}

/* --- FOOTER --- */
footer {
    background-color: #1a2d42;
    color: #aaa;
    font-size: 0.9em;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 50px 5%;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column {
    flex: 1;
}

.footer-column h3 {
    color: #ecb94a;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column p {
    line-height: 1.7;
    margin-bottom: 8px;
}

.footer-logo-center {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo-center img {
    max-width: 160px;
    opacity: 0.8;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.footer-nav a {
    color: #aaa;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #3b6fa0;
}

.footer-services {
    margin-top: 15px;
    font-size: 0.8em;
    color: #777;
    line-height: 1.8;
}

.footer-services a {
    color: #aaa;
    transition: color 0.3s ease;
}

.footer-services a:hover {
    color: #a8c528;
}

.footer-bottom {
    border-top: 1px solid #2d4a63;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.85em;
    color: #7a8ea0;
}

.footer-links {
    font-size: 0.8em;
}

.footer-links a {
    color: #7a8ea0;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3b6fa0;
}

/* --- RESPONSIVE: TABLET (1024px) --- */
@media (max-width: 1024px) {
    .info-sections-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .info-sections-container .info-section:nth-child(even) {
        margin-top: 0;
    }

    .info-section-right {
        width: 150px;
        min-width: 150px;
    }

    #inicio .contenido h2 {
        font-size: 2.5em;
    }

    .link-item {
        height: 35vw;
    }

    .contact-content {
        flex-direction: column;
    }

    .contact-info-side {
        min-width: 100%;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-nav {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* --- RESPONSIVE: MOBILE (768px) --- */
@media (max-width: 768px) {
    /* Header */
    header {
        padding: 15px 20px;
    }

    .logo img {
        height: 40px;
    }

    .hamburger {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        z-index: 999;
    }

    nav.open {
        display: block;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li a {
        padding: 14px 25px;
        border-top: none;
        border-left: 3px solid transparent;
    }

    nav ul li a:hover,
    nav ul li a.active {
        border-top-color: transparent;
        border-left-color: #3b6fa0;
        background-color: #f8f8f8;
    }

    /* Submenu mobile */
    .has-submenu:hover .submenu {
        display: none;
    }

    .submenu {
        position: static;
        box-shadow: none;
        border-top: none;
        background: #f5f5f5;
    }

    .submenu.open {
        display: block;
    }

    .submenu li a {
        padding-left: 40px;
        font-size: 0.85em;
    }

    .submenu-toggle {
        display: inline-block;
        position: absolute;
        right: 20px;
        top: 14px;
        font-size: 0.7em;
        color: #999;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .submenu-toggle.rotated {
        transform: rotate(180deg);
    }

    .has-submenu {
        position: relative;
    }

    /* Hero */
    #inicio {
        height: 70vh;
        min-height: 400px;
    }

    #inicio .contenido h2 {
        font-size: 1.8em;
    }

    #inicio .contenido h3 {
        font-size: 1.1em;
    }

    #inicio .contenido img {
        max-width: 180px;
    }

    .after-hero-text {
        padding: 40px 20px;
        font-size: 0.95em;
    }

    /* Servicios */
    #servicios {
        padding: 50px 20px;
    }

    .info-section {
        flex-direction: column;
    }

    .info-section-left {
        flex-direction: row;
        min-width: unset;
    }

    .vertical-title {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 1.1em;
    }

    .info-section-left .decorative-line {
        width: auto;
        height: 2px;
        flex: 1;
    }

    .info-section-right {
        width: 100%;
        min-width: unset;
        height: 200px;
    }

    /* Links section */
    .image-links-section {
        flex-direction: column;
    }

    .link-item {
        height: 50vw;
        min-height: 250px;
    }

    /* Contact */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    #contacto-home {
        padding: 50px 20px;
        background-attachment: scroll;
    }

    /* Footer */
    .footer-top {
        padding: 40px 20px;
    }
}
