:root {
    --corporate-blue: #023d79;
    --corporate-blue-dark: #012a52;
    --corporate-red: #FF0000;
    --corporate-red-dark: #cc0000;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-medium: #e0e0e0;
    --transition-time: 0.3s;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
    overflow-y: auto;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Padding-top inicial para desktop (contact-bar + header) */
    padding-top: calc(40px + 69.6px);
    transition: padding-top 0.5s ease-out;
}

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

.contact-bar {
    background-color: var(--corporate-blue);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.9rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1100;
    height: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-bar > .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

.contact-info {
    display: flex;
    gap: 3.5rem;
}

.contact-link {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-time) ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-link:hover {
    color: var(--corporate-red);
    text-decoration: none;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.separator {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 5px;
}

.header {
    background-color: var(--corporate-blue);
    padding: 1rem 1.5rem;
    position: fixed;
    width: 100%;
    top: 40px; /* Debajo de la contact-bar */
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.header > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: auto;
    max-width: 18rem;
    width: 100%;
    transition: transform 0.3s ease;
}

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

.navbar ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding: 0.5rem 0;
    transition: all var(--transition-time) ease-in-out;
    letter-spacing: 0.5px;
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: var(--corporate-red);
    bottom: 0;
    left: 0;
    transition: width var(--transition-time) ease-in-out;
    border-radius: 3px;
}

.navbar a:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

.navbar a.active {
    color: var(--white);
    font-weight: 700;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle i {
    color: var(--white);
    font-size: 1.8rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--corporate-blue);
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--corporate-red);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

.map-title {
    margin-top: 3.5rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-time);
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

.btn-primary:hover {
    background-color: var(--corporate-red-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 0, 0, 0.2);
}

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

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--corporate-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.2);
}

.cta-section .btn-secondary {
    background-color: var(--corporate-blue);
    color: var(--white);
    border: 2px solid var(--corporate-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.cta-section .btn-secondary:hover {
    background-color: var(--white);
    color: var(--corporate-blue);
    border-color: var(--corporate-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(2, 61, 121, 0.25);
}

.btn-small {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    margin: 0;
}

main {
    flex-grow: 1;
    /* Main ya no necesita padding-top, lo gestiona el body */
    background-color: var(--white);
}

.contact-hero-section {
    background:
        linear-gradient(rgba(2, 61, 121, 0.2), rgba(1, 42, 82, 0.9)),
        url('../img/imagen tienda.png') no-repeat center/cover;
    color: var(--white);
    padding: 6rem 1.5rem 8rem; /* Padding base para desktop */
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 50vh; /* Altura base para desktop */
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(transparent, var(--white));
    z-index: 1;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.4rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.contact-details-section {
    position: relative;
    padding: 0 0 5rem;
    z-index: 100;
    margin-top: -6rem;
}

.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.contact-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--gray-medium);
}

.card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-icon i {
    color: var(--corporate-red);
    font-size: 3rem;
}

.contact-card h3 {
    font-size: 1.7rem;
    color: var(--corporate-blue);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.contact-card p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-card address {
    font-style: normal;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

.card-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.card-link {
    color: var(--corporate-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color var(--transition-time), text-decoration var(--transition-time);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.card-link i {
    font-size: 1.1em;
    color: var(--corporate-red);
}

.card-link:hover {
    color: var(--corporate-red);
    text-decoration: underline;
}

.opening-hours {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.opening-hours li {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.opening-hours li strong {
    color: var(--corporate-blue);
    font-weight: 700;
}

.opening-hours li:last-child {
    margin-bottom: 0;
    color: var(--corporate-red);
    font-weight: 600;
}

.map-section-standalone {
    background-color: var(--white);
    padding: 0 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    position: relative;
    padding-bottom: 40%;
    height: 0;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.footer {
    background-color: var(--corporate-blue-dark);
    color: var(--white);
    padding: 3.5rem 0 1.5rem;
    font-size: 0.95rem;
    margin-top: auto;
}

.footer .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: flex-start;
}

.footer-section {
    min-width: 200px;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    flex-basis: auto;
}

.footer-section:first-child {
    flex-basis: 250px;
    flex-grow: 0;
}

.footer-section:nth-child(2) {
    flex-basis: 150px;
    flex-grow: 0;
}

.footer-logo {
    width: 18rem;
    height: auto;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    margin-left: -14px;
}

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

.about-footer p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-time) ease;
}

.footer-section ul li a:hover {
    color: var(--corporate-red);
}

.footer-section p {
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-section p .fa-map-marker-alt {
    padding-top: 0.2em;
}

.footer-section p i {
    color: var(--corporate-red);
    font-size: 1rem;
}

.footer-section p a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-time) ease;
}

.footer-section p a:hover {
    color: var(--corporate-red);
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    margin-right: 4.2rem;
    transition: color var(--transition-time) ease;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--corporate-red);
}

.contact-link-footer {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-time) ease;
}

.contact-link-footer:hover {
    color: var(--corporate-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-time) ease;
}

.footer-bottom a:hover {
    color: var(--corporate-red);
}

.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--corporate-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-time) ease;
    z-index: 999;
    text-decoration: none;
}

.scroll-to-top-btn:hover {
    background-color: var(--corporate-red-dark);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}


/* --- MEDIA QUERIES --- */

@media (max-width: 992px) {
    body {
        padding-top: calc(70px + 60px); /* Ligeramente reducido */
    }

    .header {
        padding: 1rem 1.5rem;
    }
    .logo img {
        max-width: 150px;
    }

    .contact-hero-section {
        padding: 7rem 1.5rem 6rem; /* Ligeramente reducido */
        height: 40vh;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }

    .contact-details-section {
        margin-top: -4rem;
        padding-bottom: 4rem;
    }
    .contact-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    .contact-card {
        padding: 2rem;
    }
    .card-icon i {
        font-size: 2.5rem;
    }
    .contact-card h3 {
        font-size: 1.5rem;
    }
    .contact-card p, .card-link, .opening-hours li, .contact-card address {
        font-size: 0.95rem;
    }

    .map-title {
        font-size: 2rem;
        margin-top: 3rem;
        margin-bottom: 1.5rem;
    }
    .map-container {
        padding-bottom: 50%;
    }

    .footer .footer-content {
        gap: 20px;
    }
    .footer-section:first-child {
        flex-basis: 200px;
    }
    .social-links a {
        margin-right: 1.2rem;
    }
}

@media (max-width: 768px) {
    /* Contact bar se oculta en móviles */
    .contact-bar {
        display: none;
    }

    .header {
        top: 0;
        padding: 0.8rem;
    }
    .header > .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
        order: 1;
    }
    .logo {
        order: 0;
    }
    .navbar {
        order: 2;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
        background-color: var(--corporate-blue);
    }
    .navbar.active {
        max-height: 500px;
        padding: 1rem 0;
    }
    .navbar ul {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }
    .navbar a {
        font-size: 1rem;
    }

    body {
        padding-top: 85px; /* Ligeramente reducido */
    }

    .contact-hero-section {
        padding: 6rem 1.5rem 5rem; /* Ligeramente reducido */
        height: 35vh;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1.05rem;
    }

    .contact-details-section {
        margin-top: -3rem;
        padding-bottom: 3rem;
    }
    .contact-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .contact-card {
        padding: 1.5rem;
    }
    .card-icon i {
        font-size: 2.2rem;
    }
    .contact-card h3 {
        font-size: 1.3rem;
    }
    .contact-card p, .card-link, .opening-hours li, .contact-card address {
        font-size: 0.9rem;
    }
    .card-link i {
        font-size: 1em;
    }

    .map-title {
        font-size: 1.8rem;
        margin-top: 2.5rem;
        margin-bottom: 1.2rem;
    }
    .map-container {
        padding-bottom: 60%;
    }

    .footer .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    .footer-section {
        min-width: unset;
        width: 100%;
        margin-bottom: 0;
    }
    .footer-section:last-child {
        margin-bottom: 0;
    }
    .footer-section ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .footer-section p {
        justify-content: center;
    }
    .social-links {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
    }
    .social-links a {
        margin-right: 0;
    }

    .footer-section:first-child,
    .footer-section:nth-child(2),
    .footer-section:nth-child(3) {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .footer-section:nth-child(3) p {
        text-align: center;
        word-wrap: break-word;
    }
    .about-footer p {
        font-size: 0.8rem;
    }
    .footer-section h4 {
        font-size: 1.2rem;
    }
    .footer-section ul li a,
    .footer-section p,
    .footer-bottom p {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 80px; /* Ligeramente reducido */
    }

    .contact-hero-section {
        padding: 5rem 1rem 4rem; /* Ligeramente reducido */
        height: 30vh;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 0.95rem;
    }

    .contact-details-section {
        margin-top: -2.5rem;
        padding-bottom: 2rem;
    }
    .contact-cards-grid {
        padding: 0 1rem;
        gap: 1rem;
    }
    .contact-card {
        padding: 1.2rem;
    }
    .card-icon i {
        font-size: 1.8rem;
    }
    .contact-card h3 {
        font-size: 1.1rem;
    }
    .contact-card p, .card-link, .opening-hours li, .contact-card address {
        font-size: 0.85rem;
    }

    .map-title {
        font-size: 1.6rem;
        margin-top: 2rem;
    }
    .map-container {
        padding-bottom: 70%;
    }

    .footer {
        padding: 2rem 0 0.8rem;
    }
    .footer-section:first-child,
    .footer-section:nth-child(2),
    .footer-section:nth-child(3) {
        max-width: 250px;
    }
}