/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    background: #fff;
}

a {
    text-decoration: none;
    color: #7e1b20;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-light {
    background: #f8f8f8;
}

.section-dark {
    background: #1a1a1a;
    color: #fff;
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(237, 237, 237, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

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

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

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    color: #333;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: #7e1b20;
    border-bottom-color: #7e1b20;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: #7e1b20;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    margin-top: 69px;
}

.top-bar .emergencia-label {
    display: inline-block;
    font-size: 14px;
    letter-spacing: 1px;
    margin-right: 15px;
}

.top-bar .telefonos {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 15px;
}

.top-bar a {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s;
}

.top-bar a:hover {
    color: #ffd700;
    opacity: 1;
}

.top-bar .separator {
    opacity: 0.3;
}

/* ===== HERO (CON IMAGEN CORREGIDA) ===== */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 100px 20px 60px;
    position: relative;
    background-image: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.65)), 
                      url('images/gruassarrocavehicles.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero h1 span {
    color: #7e1b20;
}

.hero p {
    font-size: 20px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero .subtitle {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 30px;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #7e1b20;
    border: 2px solid #7e1b20;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    color: #7e1b20;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(126, 27, 32, 0.3);
}

.btn-white {
    background: transparent;
    border-color: rgba(255,255,255,0.6);
    color: #fff;
}

.btn-white:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: #fff;
}

.btn-phone {
    font-size: 26px;
    padding: 18px 45px;
}

.btn-center {
    text-align: center;
    margin-top: 30px;
}

/* ===== TÍTULOS ===== */
.section-title {
    text-align: center;
    font-size: 36px;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title span {
    color: #7e1b20;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ===== SERVICIOS ===== */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.servicio-card {
    background: #fff;
    padding: 35px 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
}

.servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.12);
    border-bottom-color: #7e1b20;
}

.servicio-card .icon {
    font-size: 48px;
    color: #7e1b20;
    margin-bottom: 15px;
    display: block;
}

.servicio-card h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.servicio-card p {
    color: #666;
    font-size: 15px;
}

/* ===== GALERÍA ===== */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.galeria-item {
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

.galeria-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeria-item:hover img {
    transform: scale(1.08);
}

.galeria-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-item:hover .overlay {
    opacity: 1;
}

/* ===== CONTACTO ===== */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 30px;
}

.contacto-info h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.contacto-info ul {
    list-style: none;
}

.contacto-info ul li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contacto-info ul li .icon {
    font-size: 22px;
    color: #7e1b20;
    min-width: 30px;
}

.contacto-info ul li a {
    color: #333;
    transition: color 0.3s;
}

.contacto-info ul li a:hover {
    color: #7e1b20;
}

/* Formulario */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7e1b20;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* ===== EXPERIENCIA ===== */
.experiencia-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)), 
                url('images/homegruassarroca.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 80px 0;
}

.experiencia-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.experiencia-texto h2 {
    font-size: 38px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.2;
}

.experiencia-texto h2 span {
    color: #fff;
}

.experiencia-texto p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.experiencia-list {
    list-style: none;
    padding: 0;
}

.experiencia-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.experiencia-list li::before {
    content: "✓";
    color: #7e1b20;
    font-weight: 700;
    font-size: 22px;
}

.experiencia-list li:last-child {
    border-bottom: none;
}

/* ===== FOOTER ===== */
footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 50px 0 20px;
}

footer a {
    color: #7e1b20;
}

footer a:hover {
    color: #aa2a30;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-grid h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid ul li {
    padding: 6px 0;
}

.footer-grid ul li a {
    color: #aaa;
    transition: color 0.3s;
}

.footer-grid ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
}

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background: #25d366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 5px 30px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 40px rgba(37, 211, 102, 0.6);
    color: #fff;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ===== TABLETS ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .top-bar a {
        font-size: 16px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== MÓVIL (≤ 768px) ===== */
@media (max-width: 768px) {
    /* Header más compacto */
    header .container {
        flex-direction: column;
        gap: 8px;
        padding: 8px 15px;
    }

    .logo img {
        height: 35px;
    }

    nav ul {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li a {
        font-size: 12px;
        padding: 3px 0;
    }

    /* Top bar en dos líneas */
    .top-bar {
        margin-top: 95px;
        padding: 14px 10px 10px 10px;
    }

    .top-bar .emergencia-label {
        display: block;
        font-size: 13px;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .top-bar .telefonos {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px 12px;
    }

    .top-bar a {
        font-size: 16px;
    }

    /* Hero - imagen visible en móvil */
    .hero {
        min-height: 60vh;
        padding: 80px 20px 50px;
        background-attachment: scroll !important;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero .subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .btn-phone {
        font-size: 20px;
        padding: 14px 30px;
    }

    /* Galería */
    .galeria-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .galeria-item img {
        height: 150px;
    }

    /* Servicios */
    .servicios-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .servicio-card {
        padding: 20px 15px;
    }

    .servicio-card .icon {
        font-size: 32px;
    }

    .servicio-card h3 {
        font-size: 16px;
    }

    .servicio-card p {
        font-size: 13px;
    }

    /* Experiencia */
    .experiencia-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .experiencia-texto h2 {
        font-size: 28px;
    }

    /* Contacto */
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

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

/* ===== MÓVIL PEQUEÑO (≤ 480px) ===== */
@media (max-width: 480px) {
    .top-bar {
        margin-top: 78px;
        padding: 8px 8px;
    }

    .top-bar .emergencia-label {
        font-size: 12px;
    }

    .top-bar a {
        font-size: 14px;
    }

    .hero {
        min-height: 50vh;
        padding: 70px 15px 40px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .hero p {
        font-size: 14px;
    }

    .btn-phone {
        font-size: 17px;
        padding: 12px 25px;
    }

    .galeria-grid {
        grid-template-columns: 1fr;
    }

    .galeria-item img {
        height: 200px;
    }

    .servicios-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 24px;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
}