:root {
    /* Colores adaptados al logo de Tapicería Madrid Tapisor */
    --primary-color: #9a4d59;
    --secondary-color: #6f343e;
    --accent-color: #d49fa3;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

/* Top Bar Styles */
.top-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 0;
}

.contact-info {
    display: flex;
    /* Centramos el email y el teléfono en la barra superior */
    justify-content: center;
    gap: 20px;
}

.contact-info a {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--accent-color);
}

/* Navbar Styles */

.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    /* Centramos el logo dentro de la barra de navegación */
    margin-left: auto;
    margin-right: auto;
}

.logo {
    height: 40px;
    width: auto;
}

.nav-link {
    position: relative;
    padding: 8px 16px !important;
    color: var(--secondary-color) !important;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-quote {
    background-color: var(--accent-color);
    color: var(--secondary-color) !important;
    padding: 8px 20px !important;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-quote:hover {
    transform: scale(1.05);
    /* Usamos el color del logo al pasar el cursor y texto blanco */
    background-color: var(--primary-color);
    color: white !important;
}

/* Hero Section Styles */
.hero {
    /* Imagen de fondo actualizada para representar un salón con sofá tapizado */
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('hero-sofa.png') center/cover;
    padding: 80px 0;
    color: white;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    font-weight: bold;
}

.hero .lead {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.btn-primary {
    background-color: var(--accent-color);
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    color: var(--secondary-color);
    transition: transform 0.3s;
}

.btn-primary:hover {
    /* Al pasar el cursor, usa el color del logo y texto blanco */
    transform: scale(1.05);
    background-color: var(--primary-color);
    color: white;
}

/* Contact Form Styles */
.contact-form {
    /* Cambiamos el fondo amarillo por el color del logo */
    background: var(--primary-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Formulario de contacto: filas con campos en paralelo */
.contact-form .form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* Añadimos un margen inferior uniforme para los campos individuales del formulario
   (exceptuando los que ya se encuentran dentro de .form-row). Esto garantiza
   que cada fila y cada control tengan el mismo espacio vertical. */
.contact-form input,
.contact-form select,
.contact-form textarea {
    margin-bottom: 10px;
}

/* Los controles dentro de filas no deben tener margen inferior para mantener
   el alineamiento horizontal correcto */
.contact-form .form-row .form-control {
    margin-bottom: 0;
}

.contact-form .form-row .form-control {
    flex: 1;
    margin-bottom: 0;
}

.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

.form-control {
    border: 2px solid #eee;
    padding: 12px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

/* About Us Section Styles */
.about-us {
    background-color: #f8f9fa;
}

.about-us h2 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 20px;
}

.divider {
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin-bottom: 25px;
}

.about-content p {
    color: #6c757d;
    margin-bottom: 20px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature i {
    color: var(--primary-color);
    font-size: 1.5em;
}

.feature span {
    font-weight: 500;
    color: #495057;
}

.about-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.background-blob {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.icon-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    z-index: 1;
}

.icon-grid i {
    font-size: 3em;
    color: var(--primary-color);
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.icon-grid i:hover {
    transform: translateY(-5px);
}

/* Services Section Styles */
.services {
    background-color: #f8f9fa;
}

.service-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    /* Centrar iconos y contenido de las tarjetas de servicios */
    align-items: center;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card .icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-card .icon-wrapper i {
    font-size: 30px;
    color: white;
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-bottom: 15px;
}

.service-card p {
    color: #6c757d;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-expand {
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-expand:hover {
    color: var(--secondary-color);
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.service-list {
    columns: 2;
    column-gap: 30px;
    padding: 20px;
}

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

.service-list li {
    break-inside: avoid;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.service-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Why Choose Us Section Styles */
.why-choose-us .row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

.why-choose-us .col-md-4 {
    margin-bottom: var(--bs-gutter-y);
}

@media (min-width: 768px) {
    .why-choose-us .row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--bs-gutter-y) var(--bs-gutter-x);
    }
    
    .why-choose-us .col-md-4 {
        margin-bottom: 0;
        width: 100%;
    }
}

.feature-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    height: 100%;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5em;
    color: var(--primary-color);
}

.feature-card h4 {
    color: var(--secondary-color);
    font-size: 1.2em;
    margin: 0;
}

.feature-card p {
    color: #6c757d;
    font-size: 0.9em;
    margin: 0;
    line-height: 1.5;
}

/* What Makes Us Different Section Styles */
.difference-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    height: 100%;
    transition: transform 0.3s;
}

.difference-card:hover {
    transform: translateY(-5px);
}

.difference-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.difference-card h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.difference-card p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Work Process Section Styles */
.process-timeline {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin: 0 auto;
    padding: 20px 0;
}

.process-step {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.process-step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 15px;
}

.process-step h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.process-step p {
    color: #6c757d;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .process-timeline {
        flex-direction: column;
    }
}

/* Projects Section Styles */
.project-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    height: 100%;
    transition: transform 0.3s;
    /* Centrar iconos y contenido de las tarjetas de proyectos */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.project-icon i {
    font-size: 30px;
    color: white;
}

.project-card h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.project-card p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Service Areas Section Styles */
.service-areas {
    background-color: #fff;
}

.area-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
    transition: transform 0.3s;
}

.area-card:hover {
    transform: translateY(-5px);
}

.area-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.area-icon i {
    font-size: 24px;
    color: white;
}

.area-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.area-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.area-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #6c757d;
}

/* Estilos para enlaces de localidades y distritos: color del logo y subrayado al pasar el cursor */
.area-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s, text-decoration 0.3s;
}

.area-list a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

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

/* Pie de página: los enlaces legales deben ser blancos por defecto y subrayarse al pasar el ratón */
.footer a {
    color: #ffffff;
    text-decoration: none;
    transition: text-decoration 0.3s;
}

.footer a:hover {
    text-decoration: underline;
}

/* Aumentamos ligeramente el tamaño de la descripción de la empresa en el pie de página para darle mayor protagonismo */
.company-description {
    font-size: 1.1em;
    line-height: 1.5;
}

/* Contact Section Styles */
.contact-section {
    background-color: #f8f9fa;
}

.contact-info-block {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.contact-info-block h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item i {
    color: var(--primary-color);
    font-size: 24px;
    margin-top: 5px;
}

.info-item h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 1.1em;
}

.info-item p {
    margin: 0;
    color: #6c757d;
}

.info-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s;
}

.info-item a:hover {
    color: var(--primary-color);
}

.directions-block {
    margin-top: 30px;
}

.directions-block h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.directions-section .direction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.directions-section .direction-item i {
    color: var(--primary-color);
    font-size: 1.2em;
}

.directions-section .direction-item span {
    white-space: nowrap;
    color: #6c757d;
}

@media (max-width: 768px) {
    .directions-section .d-flex {
        flex-direction: column;
    }
    
    .directions-section .direction-item {
        width: 100%;
        justify-content: space-between;
    }
}

.direction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.direction-item i {
    color: var(--primary-color);
}

.direction-item span {
    flex-grow: 1;
    color: #6c757d;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Map Section Styles */
.map-section {
    position: relative;
    width: 100%;
}

.map-container {
    position: relative;
    width: 100%;
    height: 450px;
}

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

@media (max-width: 768px) {
    .contact-info-block,
    .contact-form {
        margin-bottom: 30px;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-info {
        justify-content: center;
    }
    
    .hero {
        text-align: center;
        padding: 40px 0;
    }
    
    .contact-form {
        margin-top: 30px;
    }
    
    .about-image {
        height: 300px;
        margin-top: 40px;
    }
    
    .features {
        margin-bottom: 30px;
    }
    
    .service-list {
        columns: 1;
    }
}

/* Testimonials Section Styles */
.testimonial-slide {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-group {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .testimonial-group {
        grid-template-columns: 1fr;
    }
}

.testimonials {
    background-color: #fff;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 15px;
    height: 100%;
}

.rating {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.testimonial-card p {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 20px;
}

.client-info h5 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.client-info span {
    color: #6c757d;
    font-size: 0.9em;
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.nav-prev, .nav-next {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.nav-prev:disabled, .nav-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.nav-prev:not(:disabled):hover, 
.nav-next:not(:disabled):hover {
    transform: scale(1.1);
}

/* Considerations Section Styles */
.considerations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.consideration-item {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.consideration-item:hover {
    transform: translateY(-5px);
}

.consideration-item i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.consideration-item h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.consideration-item p {
    color: #6c757d;
    margin: 0;
}

/* Budget Request Section Styles */
.budget-request {
    background-color: #fff;
}

.budget-info {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.steps-container {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    right: -15px;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: bold;
    font-size: 1.2em;
}

/* FAQ Section Styles */
.faq {
    background-color: #f8f9fa;
}

.accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 10px !important;
    overflow: hidden;
}

.accordion-button {
    background-color: white;
    color: var(--primary-color);
    font-weight: 500;
    padding: 20px;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-body {
    padding: 20px;
    color: #6c757d;
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
}

/* Footer Styles */
.footer {
    background-color: #1a1a1a;
}

.footer .navbar-brand {
    color: white;
    font-size: 1.8em;
}

/* Enlaces del pie de página: blancos por defecto y subrayados al pasar el cursor */
.footer ul li a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s, text-decoration 0.3s;
}

.footer ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer p {
    color: #999;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Legal Notice Modal Styles */
#legalModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#legalModal h4 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

#legalModal h4:first-child {
    margin-top: 0;
}

#legalModal p {
    color: #6c757d;
    margin-bottom: 1rem;
    text-align: justify;
}

#legalModal .modal-footer .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

#legalModal .modal-footer .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Call to Action Button Styles */
.cta-button-container {
    text-align: center;
    margin: 60px 0;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1em;
    transition: transform 0.3s, background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: scale(1.05);
    /* Cambiamos el color de fondo al color del logo y el texto a blanco */
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Footer Modal Link Styles */
.footer a[data-modal] {
    cursor: pointer;
}

/*-----------------------------------------------------------
 * Custom enhancements for contact form and districts section
 *-----------------------------------------------------------*/
/* Color white and underline on hover for legal notice and privacidad links within the contact form */
/* Aseguramos que el texto del aviso legal y privacidad sea blanco y subrayado al pasar el cursor */
.contact-form label {
    /* Mantener el color por defecto para el texto del checkbox */
    color: inherit;
}
.contact-form a,
.contact-form a:link,
.contact-form a:visited {
    color: #ffffff !important;
    text-decoration: none;
}
.contact-form a:hover {
    text-decoration: underline;
}

/* Ensure the company description in the footer uses the same font size as other footer text */
.footer .col-md-4 p {
    font-size: 1.0em;
    color: #ffffff;
}

/* Custom column width for the districts grid: five equal columns on large screens */
@media (min-width: 992px) {
    .districts-grid > [class*='col-lg'] {
        flex: 0 0 20%;
        max-width: 20%;
    }
}
/* Styling for district links */
.districts-grid a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s, text-decoration 0.3s;
}
.districts-grid a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Estilos específicos para los enlaces del aviso legal y la política de privacidad en el formulario */
.legal-link {
    color: #ffffff !important;
    text-decoration: none;
}
.legal-link:hover {
    text-decoration: underline;
}



/* --- Custom additions per user request --- */

.back-to-top{
  position:fixed;
  bottom:20px;
  right:20px;
  width:48px;
  height:48px;
  border-radius:50%;
  background: var(--primary-color);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 6px 16px rgba(0,0,0,0.2);
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease, transform .3s ease;
  z-index:9999;
}
.back-to-top.show{
  opacity:1;
  pointer-events:auto;
}
.back-to-top:hover{ transform: translateY(-2px); }
.back-to-top i{ font-size:18px; }


.gallery-separator{
  font-weight:600;
  padding:10px 0 5px 0;
  color: var(--primary-color);
}


.service-links a{
  color: var(--primary-color);
  text-decoration: none;
  transition: color .3s, text-decoration .3s;
}
.service-links a:hover{
  text-decoration: underline;
  color: var(--primary-color);
}


.whatsapp-link{ color:#ffffff; text-decoration:none; }
.whatsapp-link:hover{ color: var(--accent-color); }
.whatsapp-link i{ margin-right:6px; }


.service-areas h3{ margin-top: 2rem; }

.footer-bottom {
    text-align: center;
}


/* === Mobile adjustments requested === */
@media (max-width: 767px) {
  /* Top bar: stack email, phone and WhatsApp vertically */
  .top-bar .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  /* Form rows: every field one above the other */
  .contact-form .form-row {
    flex-direction: column;
  }

  /* Force generic form controls to take full width */
  .contact-form .form-control, 
  .contact-form .form-select, 
  .contact-form textarea {
    width: 100%;
  }

  /* Projects gallery: one image per row on mobile */
  .gallery > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Districts grid: one card per row on mobile */
  .districts-grid > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 12px;
  }
}


/* === Mobile FIX v3 (wider breakpoint + stronger rules) === */
@media (max-width: 992px) {
  /* Top bar: stack items one per line */
  .top-bar .contact-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .top-bar .contact-info a {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* Contact form: single column */
  .contact-form .form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .contact-form .form-row > *,
  .contact-form .form-control,
  .contact-form .form-select,
  .contact-form textarea,
  .contact-form input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }
  .contact-form .form-row .col,
  .contact-form .form-row .col-6,
  .contact-form .form-row .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}


/* Dual-logo fallback in CSS file */
.navbar-brand .logo-mobile { display: none; }
.navbar-brand .logo-desktop { display: inline-block; }
@media (max-width: 991.98px) {
  .navbar-brand .logo-desktop { display: none !important; }
  .navbar-brand .logo-mobile { display: inline-block !important; }
}


/* ---- Moved from inline <style id="mobile-overrides"> ---- */
/* Ensure responsive viewport */
@viewport { width: device-width; }

@media (max-width: 991.98px) {
  /* Top bar: stack email, phone, whatsapp */
  .top-bar .contact-info,
  header .top-bar .contact-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .top-bar .contact-info a,
  header .top-bar .contact-info a {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* Contact form: force single column */
  .contact-form .form-row,
  #contactForm .form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .contact-form .form-row > *,
  #contactForm .form-row > *,
  .contact-form .form-control,
  .contact-form .form-select,
  .contact-form textarea,
  .contact-form input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }
  .contact-form .form-row .col,
  .contact-form .form-row .col-6,
  .contact-form .form-row .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* Logo <picture>: ensure it doesn't break sizing */
.navbar .navbar-brand picture.logo img { height: 40px; width: auto; }


/* ---- Moved from inline <style id="dual-logo-and-mobile-fixes"> ---- */
/* Dual logo visibility */
.navbar-brand .logo-mobile { display: none; }
.navbar-brand .logo-desktop { display: inline-block; }
@media (max-width: 991.98px) {
  .navbar-brand .logo-desktop { display: none !important; }
  .navbar-brand .logo-mobile { display: inline-block !important; }
}

/* Top bar stacked on mobile */
@media (max-width: 991.98px) {
  .top-bar .contact-info { 
    display: flex !important; 
    flex-direction: column !important; 
    align-items: center !important; 
    gap: 8px !important;
  }
  .top-bar .contact-info a { 
    display: block !important; 
    width: 100% !important; 
    text-align: center !important; 
  }

  /* Contact form single column */
  .contact-form .form-row { 
    display: flex !important; 
    flex-direction: column !important; 
    gap: 12px !important; 
  }
  .contact-form .form-row > *,
  .contact-form .form-control,
  .contact-form .form-select,
  .contact-form textarea,
  .contact-form input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }
  .contact-form .form-row .col,
  .contact-form .form-row .col-6,
  .contact-form .form-row .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}
