/* 
   Daniel's Roofing Services - CSS Styles
   Using Texas Flag Colors:
   - Blue: #002868
   - Red: #BF0A30
   - White: #FFFFFF
*/

/* ===== 1. VARIABLES Y CONFIGURACIÓN GLOBAL ===== */
:root {
    --texas-blue: #002868;
    --texas-red: #BF0A30;
    --texas-white: #FFFFFF;
    --light-gray: #f9f9f9;
    --medium-gray: #555;
    --dark-gray: #333;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 5px;
}

/* ===== 2. RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
    position: relative;
    background-color: var(--texas-white);
    padding-top: 70px; /* Espacio para el header fijo */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== 3. UTILERÍAS DE SECCIÓN ===== */
.white-section {
    background-color: var(--texas-white);
    position: relative;
    z-index: 1;
}

.blue-section {
    background-color: var(--texas-blue);
    color: var(--texas-white);
    position: relative;
}

.red-section {
    background-color: var(--texas-red);
    color: var(--texas-white);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
    margin-top: 70px;
    position: relative;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--texas-blue);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--medium-gray);
}

/* Separadores y divisores */
.section-divider {
    border-top: 2px solid var(--texas-red);
    margin: 60px 0;
    position: relative;
}

.section-divider:after {
    content: '★';
    position: absolute;
    top: -15px;
    left: 50%;
    background: white;
    color: var(--texas-blue);
    padding: 0 10px;
    transform: translateX(-50%);
}

.red-separator {
    height: 2px;
    background-color: var(--texas-red);
    width: calc(100% - 100px);
    margin: 0 50px;
    display: flex;
    align-items: center;
}

/* ===== 4. BOTONES Y COMPONENTES GENERALES ===== */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    background-color: var(--texas-blue);
    color: var(--texas-white);
    border: 2px solid var(--texas-blue);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--texas-blue);
}

.btn-secondary {
    background-color: var(--texas-red);
    color: var(--texas-white);
    border: 2px solid var(--texas-red);
}

.btn-secondary:hover {
    background-color: transparent;
    color: var(--texas-red);
}

.btn-light {
    background-color: var(--texas-blue);
    color: var(--texas-white);
    border: 2px solid var(--texas-blue);
}

.btn-light:hover {
    background-color: transparent;
    color: var(--texas-white);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--texas-blue);
    color: var(--texas-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top:hover {
    background-color: var(--texas-red);
    transform: translateY(-5px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== 5. LOADER ===== */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--texas-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 150px;
    height: 150px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader:before {
    content: '';
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 8px solid transparent;
    border-top-color: var(--texas-blue);
    border-bottom-color: var(--texas-red);
    border-left-color: var(--texas-blue);
    border-right-color: var(--texas-red);
    position: absolute;
    animation: spin 1.5s linear infinite;
}

.loader-logo {
    position: absolute;
    width: 100px;
    height: auto;
    z-index: 2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== 6. ANIMACIONES ===== */
.fadeIn {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slideDown {
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.fade {
    animation: fadeEffect 1s ease-in-out;
}

@keyframes fadeEffect {
    from {opacity: 0.4}
    to {opacity: 1}
}

/* ===== 7. HEADER Y NAVEGACIÓN ===== */
/* Header fijo en la parte superior */
.header {
    background-color: var(--texas-white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
}

.header.sticky {
    background-color: var(--texas-white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

/* Logo */
.logo {
    position: relative;
    z-index: 101;
}

.logo img {
    max-width: 120px;
    height: auto;
    transition: all 0.3s ease;
}

/* Menú de navegación principal - alineado a la derecha */
.nav-menu {
    position: relative;
    flex-grow: 1;
    display: flex;
    justify-content: flex-end; /* Alinea todo el contenido a la derecha */
    align-items: center;
    transition: all 0.3s ease;
}

.nav-menu ul {
    display: flex;
    margin: 0;
    padding: 0;
    justify-content: flex-end; /* Alinea los elementos de la lista a la derecha */
}

.nav-menu li {
    margin-left: 25px;
    list-style: none;
}

.nav-menu a {
    color: var(--dark-gray);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--texas-blue);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--texas-blue);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Iconos de redes sociales en el menú */
.social-medias {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.social-medias a {
    color: var(--texas-blue);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-medias a:hover {
    color: var(--texas-red);
}

/* Botón de menú móvil - visible en tamaños medianos y pequeños */
.mobile-menu-toggle {
    display: none; /* Por defecto oculto en escritorio */
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
    position: relative;
    z-index: 102; /* Mayor que cualquier otro elemento */
    padding: 8px;
    transition: color 0.3s ease;
    background: transparent;
    border: none;
}

.mobile-menu-toggle:hover {
    color: var(--texas-blue);
}

/* ===== 8. SECCIÓN HERO ===== */
.hero {
    position: relative;
    height: 100vh;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 80px;
}

/* Contenedor del video para asegurar visibilidad completa */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Video optimizado para todas las pantallas */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover; /* Mantiene la proporción y cubre todo el contenedor */
    max-width: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    color: var(--texas-white);
    padding: 0 20px;
}

.hero-screen {
    padding: 0 30px 30px 30px;
}

.hero-screen h1 {
    font-size: 3rem;
    text-align: center;
    margin-top: 80px;
    color: var(--texas-blue);
}

.hero-screen p {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 20px;
    color: black;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
}

/* ===== 9. SECCIÓN SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.services-grid::after {
    content: "";
    grid-column: span 1;
}

.service-card {
    background-color: var(--texas-white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    background-color: var(--texas-blue);
    color: var(--texas-white);
}

.service-card:hover h3,
.service-card:hover p {
    color: var(--texas-white);
}

.service-card:hover .service-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--texas-white);
}

.service-card:hover .service-link {
    color: var(--texas-white);
}

.service-icon {
    margin-bottom: 20px;
    width: 70px;
    height: 70px;
    background-color: rgba(0, 40, 104, 0.1);
    color: var(--texas-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--texas-blue);
    width: 100%;
    text-align: center;
}

.service-card p {
    margin-bottom: 20px;
    color: #666;
    width: 100%;
    text-align: center;
}

.service-link {
    color: var(--texas-red);
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px 15px;
    font-family: inherit;
    font-size: inherit;
    transition: all 0.3s ease;
    margin-top: auto;
}

.service-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(5px);
}

/* Service Modal */
.service-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.service-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.service-modal {
    background-color: var(--texas-red);
    color: var(--texas-white);
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.service-modal-overlay.active .service-modal {
    transform: translateY(0);
}

.service-modal h4 {
    color: var(--texas-white);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.service-modal p {
    color: var(--texas-white);
    text-align: left;
    margin-bottom: 15px;
}

.service-modal ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.service-modal ul li {
    color: var(--texas-white);
    margin-bottom: 8px;
}

.service-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--texas-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.service-modal-close:hover {
    transform: rotate(90deg);
}

.service-modal .btn {
    margin-top: 20px;
    display: block;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}

.service-modal .service-image {
    margin: 20px auto;
    text-align: center;
}

.service-modal .service-image img {
    max-width: 100%;
    border-radius: var(--border-radius);
    margin: 0 auto;
}

/* ===== ESTILOS PARA ALINEACIÓN PERFECTA DE ALTURA EN ABOUT US ===== */

/* Contenedor principal con flexbox */
.about {
    padding: 100px 0;
    position: relative;
    background-color: var(--texas-white);
}

/* Configuración del contenedor flexbox */
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Recuadro de texto - control preciso de dimensiones */
.about-text-box {
    background-color: var(--texas-blue);
    color: var(--texas-white);
    padding: 40px;
    border-radius: 0;
    width: calc(50% - 15px);
    flex: 0 0 calc(50% - 15px); /* Evita que se estire más allá del ancho definido */
    min-width: 300px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.about-text-box h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--texas-white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.about-text-box p {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 1rem;
    color: var(--texas-white);
}

/* Lista de características */
.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 25px 0;
}

.feature-item {
    display: flex;
    align-items: center;
}

.feature-item i {
    color: var(--texas-red);
    margin-right: 10px;
    font-size: 1.1rem;
}

.feature-item span {
    font-size: 0.9rem;
}

/* Botón de about */
.about-btn {
    display: inline-block;
    background-color: var(--texas-red);
    color: var(--texas-white);
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    transition: var(--transition);
    margin-top: auto; /* Empuja el botón hacia abajo */
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    cursor: pointer;
    align-self: center;
}

.about-btn:hover {
    background-color: #A00020;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== SLIDESHOW CON ALTURA PERFECTAMENTE IGUAL ===== */

/* Contenedor del slideshow */
.about-slideshow {
    width: calc(50% - 15px);
    flex: 0 0 calc(50% - 15px); /* Evita que se estire más allá del ancho definido */
    min-width: 300px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    /* La altura se controlará mediante JavaScript */
}

/* Slideshow container */
.slideshow-container {
    position: relative;
    width: 100%;
    /* La altura se controlará mediante JavaScript */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: var(--texas-blue);
}

/* Estilo para cada slide */
.mySlides {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
    animation: fadeEffect 1s ease;
}

/* Mostrar el slide activo */
.mySlides.active {
    display: block;
}

/* Imágenes dentro de los slides */
.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Botones de navegación prev/next */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Contenedor de los puntos indicadores */
.dots-container {
    text-align: center;
    margin-top: 10px;
    padding: 10px 0;
}

/* Puntos indicadores */
.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: var(--texas-blue);
}

/* Animación para el fade */
@keyframes fadeEffect {
    from {opacity: 0.4}
    to {opacity: 1}
}

/* ===== MEDIA QUERIES PARA RESPONSIVE ===== */

@media screen and (max-width: 991px) {
    .about-content {
        flex-direction: column;
        align-items: center;
    }
    
    .about-text-box,
    .about-slideshow {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        height: auto !important; /* Importante: anular altura fija en móvil */
    }
    
    .about-text-box {
        align-items: center;
        text-align: center;
    }
    
    .features-list {
        justify-content: center;
    }
    
    .feature-item {
        justify-content: center;
    }
    
    .about-btn {
        align-self: center;
    }
    
    .about-slideshow {
        margin-top: 30px;
        order: 2;
    }
    
    .slideshow-container {
        height: 350px !important; /* Altura fija para móvil */
    }
    
    .mySlides {
        height: 100% !important; /* Asegurar que los slides ocupen toda la altura */
    }
}

@media screen and (max-width: 576px) {
    .about {
        padding: 60px 0;
    }
    
    .about-text-box {
        padding: 30px 20px;
    }
    
    .about-text-box h2 {
        font-size: 2rem;
    }
    
    .features-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .slideshow-container {
        height: 300px !important; /* Altura reducida para móviles pequeños */
    }
    
    .prev, .next {
        padding: 10px;
        font-size: 16px;
    }
}

/* ===== 11. CTA SECTION ===== */
.cta {
    background-color: var(--texas-red);
    color: var(--texas-white);
    padding: 60px 0;
    text-align: center;
    position: relative;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

/* ===== 12. TESTIMONIALS SECTION ===== */
.testimonials {
    padding: 80px 0;
    background-color: var(--light-gray);
    position: relative;
}

.testimonial-slider {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.testimonial {
    background-color: var(--texas-white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin: 0 15px;
    display: none;
    position: relative;
}

.testimonial:first-child {
    display: block;
}

.testimonial-content {
    margin-bottom: 20px;
    position: relative;
}

.testimonial-content p {
    font-style: italic;
    color: var(--medium-gray);
    font-size: 1.1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    position: relative;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.author-info h4 {
    color: var(--texas-blue);
    margin-bottom: 5px;
}

.author-info p {
    color: #666;
    font-size: 0.9rem;
}

.rating {
    margin-top: 8px;
    color: #FFD700;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 15px;
    position: relative;
}

.prev-btn,
.next-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--texas-blue);
    color: var(--texas-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.prev-btn:hover,
.next-btn:hover {
    background-color: var(--texas-red);
}

/* ===== 13. CONTACT SECTION ===== */
.contact {
    padding: 80px 0;
    position: relative;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    position: relative;
}

.contact-info {
    position: relative;
}

.contact-info h3,
.contact-form h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--texas-blue);
}

.info-item {
    display: flex;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.8rem;
    color: var(--texas-red);
    margin-right: 20px;
    margin-top: 5px;
}

.info-item h4 {
    margin-bottom: 5px;
    color: var(--texas-blue);
}

.info-item p {
    color: var(--medium-gray);
}

.info-item a {
    color: var(--medium-gray);
}

.info-item a:hover {
    color: var(--texas-red);
}

.contact-form {
    position: relative;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--texas-blue);
}

/* ===== 14. FOOTER ===== */
.footer {
    background-color: var(--texas-blue);
    color: var(--texas-white);
    padding: 70px 0 0;
    margin-top: 50px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    position: relative;
}

.footer-logo {
    position: relative;
}

.footer-logo img {
    display: block;
    margin: 0 auto;
    max-width: 900px;
    height: auto;
    margin-bottom: 15px;
}

.footer-logo p {
    text-align: center;
    font-size: 1rem;
}

.footer h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--texas-red);
}

.footer-links,
.footer-services {
    position: relative;
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 10px;
}

.footer-links ul li a:hover,
.footer-services ul li a:hover {
    color: var(--texas-red);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.footer-social {
    position: relative;
}

.footer-social a {
    color: var(--texas-white);
    margin-left: 20px;
    font-size: 1.2rem;
}

.footer-social a:hover {
    color: var(--texas-red);
}

/* ===== 15. UTILERÍAS DE VISIBILIDAD ===== */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* ===== 16. MEDIA QUERIES RESPONSIVOS ===== */

/* En dispositivos grandes, ocultar el botón móvil */
@media screen and (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex !important; /* Forzar mostrar siempre en pantallas grandes */
    }
    
    /* Posicionar los iconos sociales a la derecha */
    .nav-social {
        margin-left: 20px; /* Espacio entre la navegación y los íconos sociales */
        margin-right: 0; /* Eliminar margen derecho para alinear al borde */
    }
    
    .nav-menu ul {
        margin-right: 30px;
    }
    
    /* Ocultar social-medias móvil si existe */
    .social-medias.mobile-social {
        display: none;
    }
}

/* Pantallas grandes */
@media screen and (min-width: 2000px) {
    .hero {
        max-height: 900px;
    }
    
    .hero-video {
        width: 100%;
        height: auto;
    }
}

/* Ratios específicos */
@media screen and (min-aspect-ratio: 16/9) {
    .hero-video {
        width: 100%;
        height: auto;
    }
}

@media screen and (max-aspect-ratio: 16/9) {
    .hero-video {
        width: auto;
        height: 100%;
    }
}

/* Desktop y tablets grandes */
@media screen and (min-width: 992px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* Ajustes específicos para pantallas medianas */
@media screen and (max-width: 991px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards en una fila para tablets */
    }
    
    .services-grid::after {
        display: none;
    }
    
    /* Cambiar visibilidad de elementos */
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    /* Cambios en about-content para dispositivos pequeños */
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-text-box {
        width: 100%;
        max-width: 100%;
    }
    
    .features-list {
        justify-content: center;
    }
    
    .feature-item {
        justify-content: center;
    }
    
    /* Ajustes para el contenedor de imagen móvil */
    .workers-image-container {
        margin: -30px auto 30px auto;
    }
    
    .slideshow-container {
        min-height: 350px; /* Altura menor en pantallas más pequeñas */
    }
}

/* En dispositivos medianos y pequeños, mostrar el botón */
@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important; /* Forzar mostrar el botón */
        position: relative;
        margin-left: auto; /* Empuja el botón a la derecha */
        order: 3; /* Asegura que aparezca después de otros elementos */
    }
    
    /* Header con grid para posicionamiento preciso */
    .header .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "logo . toggle";
        align-items: center;
    }
    
    /* Posición del botón en el grid */
    .mobile-menu-toggle {
        grid-area: toggle;
        justify-self: end;
    }
    
    /* Mejora de visibilidad */
    .mobile-menu-toggle i {
        display: inline-block; /* Asegura que el ícono sea visible */
        font-size: 1.8rem; /* Tamaño más grande para mejor visibilidad */
    }
    
    /* Estilos específicos para el estado del menú */
    .mobile-menu-toggle i.fa-bars, 
    .mobile-menu-toggle i.fa-times {
        width: 1.8rem; /* Ancho fijo para evitar saltos */
        text-align: center;
    }
    
    /* Navegación móvil */
    .nav-menu {
        display: none;
    }
    
    .nav-menu.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--texas-white);
        box-shadow: var(--shadow-sm);
        padding: 80px 20px 20px;
        z-index: 99;
        overflow-y: auto;
    }
    
    .nav-menu.active ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 0;
        padding: 0;
        gap: 20px;
    }
    
    .nav-menu.active li {
        margin: 0 0 15px 0;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 8px 0;
        font-size: 1.2rem;
    }
    
    .nav-menu a::after {
        display: none; /* Eliminar línea debajo en móvil */
    }
    
    /* Redes sociales centradas en móvil */
    .social-medias.nav-social {
        margin: 25px 0 0;
        justify-content: center;
        width: 100%;
    }
    
    /* Posicionamiento de los iconos sociales en móvil */
    .social-medias.mobile-social {
        grid-area: social;
        margin-right: 15px;
    }
    
    /* Ocultar los iconos sociales en el menú de navegación */
    .nav-menu .social-medias {
        display: none;
    }
    
    /* Hero ajustes */
    .hero {
        height: 70vh;
        max-height: 600px;
        padding-bottom: 60px;
    }
    
    .hero-content {
        width: 90%;
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Asegurar que el video se vea correctamente en móviles */
    .hero-video {
        object-position: center; /* Centrar el video */
    }
    
    /* Secciones */
    .section-header h2 {
        font-size: 2rem;
    }
    
    .about {
        padding: 50px 0;
    }
    
    .about-content {
        gap: 20px;
    }
    
    .about-text-box {
        padding: 30px 20px;
    }
    
    .about-text-box h2 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial {
        padding: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-social {
        margin-top: 15px;
    }
    
    .footer-social a {
        margin: 0 10px;
    }
    
    /* Mantener el margen de los separadores */
    .red-separator {
        width: calc(100% - 100px);
        margin: 0 50px;
    }
}

/* Móviles pequeños */
@media screen and (max-width: 576px) {
    .service-card {
        padding: 20px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .slideshow-container {
        min-height: 300px;
    }
}

/* Móviles muy pequeños */
@media screen and (max-width: 480px) {
    .mobile-menu-toggle {
        padding: 10px; /* Padding extra para área de toque más grande */
    }
    
    .mobile-menu-toggle i {
        font-size: 1.6rem; /* Ligeramente más pequeño pero adecuado */
    }
    
    /* Ajustes de tamaño y espaciado para pantallas muy pequeñas */
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        height: 60vh; /* Altura reducida para pantallas muy pequeñas */
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    /* Ajustar posición del video para pantallas pequeñas */
    .hero-video {
        object-position: center 20%; /* Ajustar posición vertical */
    }
    
    .about-text-box h2 {
        font-size: 1.8rem;
    }
    
    .cta h2 {
        font-size: 1.8rem;
    }
    
    .service-card {
        padding: 15px;
    }
    
    /* Reducir espaciado */
    .section-divider {
        margin: 40px 0;
    }
    
    /* Ajustar marginados para pantallas muy pequeñas */
    .red-separator {
        width: calc(100% - 60px);
        margin: 0 30px;
    }
    
    /* Ajustes para la navegación */
    .nav-menu.active {
        padding-top: 70px;
    }
    
    .nav-menu a {
        font-size: 1.1rem;
    }
    
    /* Ajustes adicionales para el footer */
    .footer h3 {
        font-size: 1.1rem;
    }
    
    .footer-bottom {
        padding: 15px 0;
    }
    
    /* Ajustes para formularios */
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        padding: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Ajustes para Landscape (horizontal) en móviles */
@media screen and (max-height: 500px) and (orientation: landscape) {
    /* Ajustes para el menú móvil en orientación horizontal */
    .nav-menu.active {
        overflow-y: scroll;
    }
    
    /* Ajustar altura del hero */
    .hero {
        height: 100vh; /* Usar toda la altura disponible */
        min-height: 400px;
    }
    
    /* Reducir padding para aprovechar espacio vertical */
    .section-header {
        margin-top: 40px;
        margin-bottom: 40px;
    }
    
    .cta {
        padding: 30px 0;
    }
}

/* Ajustes específicos para dispositivos de alta densidad (retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimización para pantallas de alta resolución */
    .hero-video {
        object-fit: cover;
    }
}

/* ===== 17. AJUSTES PARA EFECTOS ESPECIALES ===== */
/* Efecto de transición para el icono del menú */
.fa-times {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

/* Propiedades de carga diferida de imágenes */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Efecto diagonal para secciones específicas */
.diagonal-grid {
    position: relative;
    overflow: hidden;
}

.diagonal-grid::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: calc(100% + 200px);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 25%, transparent 25%) 0 0,
                linear-gradient(225deg, rgba(255,255,255,0.1) 25%, transparent 25%) 0 0,
                linear-gradient(315deg, rgba(255,255,255,0.1) 25%, transparent 25%) 0 0,
                linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%) 0 0;
    background-size: 30px 30px;
    z-index: 0;
}

/* Estilos para elementos específicos de Texas */
.texas-grid-background {
    background-image: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)),
                     url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><path d="M25,2 L48,25 L25,48 L2,25 Z" fill="none" stroke="%23f0f0f0" stroke-width="1"/></svg>');
    background-size: 50px 50px;
}

/* 
   Responsive Design Improvements for Daniel's Roofing Services
   - Centers content across all screen sizes
   - Improves mobile experience
*/

/* ===== GLOBAL CENTERING IMPROVEMENTS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    position: relative;
    text-align: center; /* Center text by default */
  }
  
  .section-header {
    text-align: center;
    margin-bottom: 50px;
    margin-top: 50px;
  }
  
  /* ===== HERO SECTION IMPROVEMENTS ===== */
  .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    color: var(--texas-white);
    padding: 0 20px;
    margin: 0 auto; /* Center horizontally */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align buttons to bottom */
    height: 100%;
  }
  
  .hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px; /* Add space at the bottom */
  }
  
  .hero-screen {
    text-align: center;
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;
  }
  
  /* ===== SERVICES GRID IMPROVEMENTS ===== */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 0 auto 50px auto;
    max-width: 1200px;
    justify-content: center;
  }
  
  .service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    padding: 30px 20px;
  }
  
  /* ===== ABOUT SECTION IMPROVEMENTS ===== */
  .about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .about-text-box {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    padding: 40px 30px;
    text-align: center;
  }
  
  .features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 25px auto;
    justify-content: center;
  }
  
  .feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* ===== TESTIMONIALS IMPROVEMENTS ===== */
  .testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .testimonial {
    text-align: center;
    padding: 30px;
  }
  
  .testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* ===== CONTACT SECTION IMPROVEMENTS ===== */
  .contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .contact-info, .contact-form {
    text-align: center;
  }
  
  .info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    text-align: center;
  }
  
  .info-item i {
    font-size: 2rem;
    color: var(--texas-red);
    margin-bottom: 15px;
  }
  
  /* ===== FOOTER IMPROVEMENTS ===== */
  .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
    margin: 0 auto 30px auto;
    max-width: 1200px;
  }
  
  .footer-links, .footer-services {
    text-align: center;
  }
  
  .footer-links ul, .footer-services ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 20px 0;
  }
  
  /* ===== RESPONSIVE IMPROVEMENTS ===== */
  @media screen and (max-width: 991px) {
    .hero-buttons {
      flex-direction: row; /* Keep buttons side by side on tablets */
      flex-wrap: wrap;
      justify-content: center;
    }
    
    .services-grid {
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      padding: 0 15px;
    }
    
    .about-image {
      width: 100%;
      max-width: 500px;
      margin: 0 auto;
    }
  }
  
  @media screen and (max-width: 768px) {
    .hero-buttons {
      flex-direction: column; /* Stack buttons on mobile */
      width: 100%;
      max-width: 250px;
      margin: 0 auto 30px auto;
    }
    
    .btn {
      width: 100%;
    }
    
    .header .container {
      justify-content: space-between;
    }
    
    .about-text-box {
      padding: 30px 20px;
    }
    
    .features-list {
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    
    /* Adjust testimonial author layout */
    .testimonial-author {
      flex-direction: column;
    }
    
    .testimonial-author img {
      margin-bottom: 15px;
      margin-right: 0;
    }
    
    /* Make contact form inputs larger for touch */
    .form-group input,
    .form-group select,
    .form-group textarea {
      padding: 15px;
      font-size: 16px; /* Prevent zoom on iOS */
    }
  }
  
  @media screen and (max-width: 576px) {
    .hero-screen h1 {
      font-size: 1.8rem;
    }
    
    .hero-screen p {
      font-size: 1rem;
    }
    
    .section-header h2 {
      font-size: 2rem;
    }
    
    .section-header p {
      font-size: 1rem;
    }
    
    /* Smaller padding on mobile */
    .service-card {
      padding: 20px 15px;
    }
    
    .about-text-box {
      padding: 25px 15px;
    }
    
    .cta {
      padding: 40px 15px;
    }
    
    /* Single column features list on small mobile */
    .features-list {
      grid-template-columns: 1fr;
    }
  }

/* Reemplazar todas las reglas anteriores de media queries con estas */

/* ===== CORRECCIÓN PARA LA NAVEGACIÓN MÓVIL ===== */
@media screen and (max-width: 768px) {
    /* Configuración básica del header */
    .header .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
    }
    
    /* Logo a la izquierda */
    .logo {
        flex: 0 0 auto;
        max-width: 100px;
    }
    
    /* Contenedor de elementos a la derecha */
    .right-elements {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    /* Iconos sociales en la barra superior */
    .social-medias.mobile-social {
        display: flex;
        align-items: center;
        margin-right: 15px;
    }
    
    .social-medias.mobile-social a {
        margin: 0 8px;
        font-size: 1.4rem;
        color: var(--texas-blue);
    }
    
    .social-medias.mobile-social a:last-child {
        margin-right: 0;
    }
    
    /* Botón de menú móvil */
    .mobile-menu-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--dark-gray);
        padding: 8px;
        background: transparent;
        border: none;
    }
    
    .mobile-menu-toggle i {
        display: block;
        font-size: 1.8rem;
        width: 1.8rem;
        text-align: center;
    }
    
    /* Menú de navegación */
    .nav-menu {
        flex-basis: 100%;
        margin-top: 10px;
        display: none;
    }
    
    .nav-menu.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--texas-white);
        padding: 80px 20px 20px;
        z-index: 99;
        overflow-y: auto;
    }
    
    .nav-menu.active ul {
        flex-direction: column;
        align-items: center;
        margin: 0;
        padding: 0;
    }
    
    .nav-menu.active li {
        margin: 0 0 15px 0;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 8px 0;
        font-size: 1.2rem;
    }
    
    /* Ocultar iconos sociales en el menú de navegación en móvil */
    .nav-menu .social-medias {
        display: none;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media screen and (max-width: 480px) {
    .logo img {
        max-width: 80px;
    }
    
    .social-medias.mobile-social a {
        margin: 0 5px;
        font-size: 1.3rem;
    }
    
    .mobile-menu-toggle i {
        font-size: 1.6rem;
        width: 1.6rem;
    }
}

/* Asegurarse de que en pantallas grandes el menú esté visible */
@media screen and (min-width: 769px) {
    .mobile-menu-toggle, 
    .social-medias.mobile-social {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
    }
}

/* Estilos adicionales para el formulario de contacto */

/* Estilos adicionales para el formulario de contacto */

/* Estilos para mensajes de estado del formulario */

/* Estilos base para campos requeridos */
.form-group input:required,
.form-group select:required {
    border-left: 3px solid var(--texas-blue);
}

/* Estilos de enfoque */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--texas-blue);
    box-shadow: 0 0 5px rgba(0, 40, 104, 0.3);
    outline: none;
}

/* Estilos de validación */
.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown) {
    border-left: 3px solid var(--texas-red);
}

.form-group input:valid:not(:placeholder-shown),
.form-group select:valid:not(:placeholder-shown) {
    border-left: 3px solid #4CAF50; /* verde para indicar validez */
}

/* Mensajes de estado del formulario */
.form-status {
    margin-top: 15px;
    padding: 15px;
    border-radius: 5px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.form-status.success {
    display: block;
    background-color: rgba(76, 175, 80, 0.2);
    color: #2E7D32;
    border: 1px solid #2E7D32;
}

.form-status.error {
    display: block;
    background-color: rgba(244, 67, 54, 0.2);
    color: #C62828;
    border: 1px solid #C62828;
}

/* Estilos para botón en estado de carga */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}