/* ===== Mobile-first base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #e8e8e8;
    position: relative;
    min-height: 100vh;
}

/* Skip link: oculto por defecto, visible solo al recibir foco (teclado) */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0.5rem;
    z-index: 1001;
    padding: 0.75rem 1rem;
    background: #FF330F;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 4px;
    transition: left 0.2s;
}
.skip-link:focus {
    left: 0.5rem;
    outline: 2px solid white;
    outline-offset: 2px;
}

header {
    background: linear-gradient(to bottom, #252525, #3B3B3B);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid #FF330F;
    transition: transform 0.3s ease-in-out;
}

header.header-hidden {
    transform: translateY(-100%);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: space-between;
    align-items: stretch;
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 5rem;
}

/* Botón hamburguesa - solo visible en móvil */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: white;
    transition: transform 0.2s;
}

.hamburger:hover {
    opacity: 0.9;
}

.hamburger-line {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menú en móvil: oculto por defecto, se abre con .nav-bar.is-open */
.nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-bar.is-open .nav-links {
    display: flex;
}

/* Bloque derecho: teléfono arriba; debajo Facebook a la izq. e Instagram a la der. de Facebook */
.header-contact-block {
    display: flex;
    flex-direction: column;
}

.header-social-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.logo-link {
    text-decoration: none;
    display: block;
    line-height: 0;
}

.logo {
    height: 70px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

/* Logo más pequeño en móvil */
@media (max-width: 767px) {
    .logo {
        height: 44px;
        max-width: 160px;
    }
}

.logo-text {
    color: #FF330F;
    font-size: 1.5rem;
    font-weight: 600;
    white-space: nowrap;
}

.phone-number {
    color: white;
    font-size: 1rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.header-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.header-social-link:hover {
    color: #FF330F;
    background-color: rgba(255, 255, 255, 0.1);
}

.header-social-link svg {
    width: 22px;
    height: 22px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 51, 15, 0.1);
    color: #CC290C;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

main {
    background-color: white;
    margin: 5rem 0 2rem 0;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

h2 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

section {
    margin-bottom: 2rem;
}

/* Hero Section - mobile first */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    min-height: 260px;
    color: white;
    border-radius: 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: -1rem;
    margin-bottom: 0;
    width: 100vw;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 51, 15, 0.15);
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.hero-buttons .btn {
    min-width: 160px;
    min-height: 2.75rem;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #FF330F;
    color: white;
    border-color: #FF330F;
}

.btn-primary:hover {
    background-color: #CC290C;
    border-color: #CC290C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 51, 15, 0.35);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: #FF330F;
    border-color: white;
}

/* Features Section */
.features {
    margin-top: 3rem;
    text-align: center;
}

.features h2 {
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Services Section */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.services-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #FF330F;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    margin-top: 1rem;
    padding-left: 0;
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(to bottom, #252525, #3B3B3B);
    color: white;
    border-radius: 8px;
    margin-top: 3rem;
}

.cta-section h2 {
    color: white;
}

.cta-section p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Contact Page */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-form-section,
.contact-info-section {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.contact-form-section h2,
.contact-info-section h2,
.contact-info-section .map-container h2 {
    text-align: center;
}

.contact-form {
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    text-align: center;
}

.info-item {
    text-align: center;
}

.info-item p {
    text-align: center;
}

.map-container h2 {
    text-align: center;
}

.contact-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF330F;
}

.form-group textarea {
    resize: vertical;
    min-height: 8rem;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.contact-info {
    margin-bottom: 2rem;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: #555;
    margin: 0;
}

.map-container {
    margin-top: 2rem;
}

.map {
    margin-top: 1rem;
}

.map-note {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.about-section {
    margin-top: 0.5rem;
    padding: 2rem 0;
}

.about-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.about-content {
    max-width: 100%;
    margin: 0;
}

.about-text {
    padding: 0;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: #555;
    text-align: center;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.info-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.info-section h2 {
    text-align: center;
}

.info-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    text-align: center;
}

/* WhatsApp Float Button - touch target */
.whatsapp-float {
    position: fixed;
    width: 56px;
    height: 56px;
    min-width: 44px;
    min-height: 44px;
    bottom: 1rem;
    right: 1rem;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
    overflow: hidden;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

footer {
    background-color: #3B3B3B;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

footer p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.75);
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    margin: 0 1rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-credit {
    margin-bottom: 1rem;
}

.footer-credit-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 0.5rem 0;
}

.footer-logo {
    display: inline-block;
    max-height: 36px;
    width: auto;
    opacity: 0.7;
    filter: grayscale(100%) brightness(1.1);
    border-radius: 8px;
    vertical-align: middle;
}

/* ===== Tablet and desktop (min-width first) ===== */
@media (min-width: 768px) {
    nav {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .nav-top {
        width: auto;
        min-height: auto;
    }

    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        width: auto;
        gap: 1.5rem;
        padding: 0;
        border-top: none;
    }

    .nav-links a {
        justify-content: flex-start;
    }

    main {
        padding: 2rem;
        margin-top: 5rem;
    }

    .hero {
        padding: 4.5rem 0;
        min-height: 320px;
        margin-top: -2rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .hero-buttons .btn {
        width: auto;
    }

    .btn {
        width: auto;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .services-section {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .about-section h2 {
        font-size: 2rem;
    }

    .about-text p {
        font-size: 1.05rem;
    }

    .whatsapp-float {
        width: 60px;
        height: 60px;
        bottom: 1.25rem;
        right: 1.25rem;
    }

    .logo-text {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}
