/* CSS mejorado y responsivo */
:root {
    --primary-blue: #ff7b00;
    --secondary-blue: #ffad60;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --font-title: 'Roboto', Arial, sans-serif;
    --font-body: 'Roboto', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-title);
    font-weight: 700;
}

/* ==================== NAVBAR ==================== */
.navbar {
    background: rgba(255, 255, 255, 255) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-blue) !important;
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 92px;
    margin-right: 20px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    position: relative;
    top: 8px;
    left: 0;
    box-shadow: 0 4px 16px rgba(0,97,255,0.08);
    background: #fff;
    border-radius: 16px;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: 0.3s;
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--primary-blue) !important;
}

/* ==================== HERO SECTION ==================== */
.hero {
    padding: 120px 0 60px;
    background-color: #f0f4f8;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: 70px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0, 97, 255, 0.1);
    color: var(--primary-blue);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    color: #1a1a1a;
    margin-bottom: 25px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.section-padding {
    padding: 100px 0;
}

#servicios {
    background-color: var(--bg-light);
}

#productos {
    background-image: linear-gradient(rgba(240, 247, 255, 0.95), rgba(240, 247, 255, 0.95)), url('imagenes/productos-bg.jpg');
    background-size: cover;
    background-position: center;
}

#contacto {
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('imagenes/contacto-bg.jpg');
    background-size: cover;
    background-position: bottom;
}

/* ==================== TARJETAS DE SERVICIO ==================== */
.card-service {
    background: var(--white);
    border: none;
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-service:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 97, 255, 0.1);
}

.card-service:hover img {
    opacity: 0.05 !important;
}

.card-service h4 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.icon-wrapper {
    width: 65px;
    height: 65px;
    background: rgba(0, 97, 255, 0.05);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

/* ==================== BOTONES ==================== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-blue), #cc7a00);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 166, 0, 0.3);
    transition: 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary-custom:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 187, 0, 0.4);
    color: white;
}

.btn-primary-custom:active {
    transform: scale(0.98);
}

/* ==================== CARRUSEL MEJORADO ==================== */
#bricksCarousel {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

#bricksCarousel .carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

#bricksCarousel .carousel-fade .carousel-item.active {
    opacity: 1;
}

#bricksCarousel .carousel-inner {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 97, 255, 0.15);
}

#bricksCarousel .carousel-item {
    transition: opacity 0.6s ease-in-out !important;
}

/* Controles del carrusel */
#bricksCarousel .carousel-control-prev,
#bricksCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    border-radius: 50%;
    border: none;
    opacity: 1;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

#bricksCarousel .carousel-control-prev:hover,
#bricksCarousel .carousel-control-next:hover {
    background: #004ecc;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 97, 255, 0.4);
}

#bricksCarousel .carousel-control-prev {
    left: -70px;
}

#bricksCarousel .carousel-control-next {
    right: -70px;
}

#bricksCarousel .carousel-control-prev::after,
#bricksCarousel .carousel-control-next::after {
    display: none;
}

#bricksCarousel .carousel-control-prev i,
#bricksCarousel .carousel-control-next i {
    color: white;
    font-size: 1.2rem;
}

/* Indicadores mejorados */
#bricksCarousel .carousel-indicators {
    position: relative;
    bottom: auto;
    margin-top: 0;
    padding-bottom: 20px;
}

#bricksCarousel .carousel-indicators button {
    background-color: #ddd;
    border: none;
    opacity: 0.6;
    transition: all 0.3s ease;
}

#bricksCarousel .carousel-indicators button.active {
    background-color: var(--primary-blue);
    opacity: 1;
    transform: scale(1.2);
}

#bricksCarousel .carousel-indicators button:hover {
    opacity: 0.8;
    transform: scale(1.15);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-decoration-color: var(--white);
}

/* ==================== FOOTER ==================== */
footer {
    background: #ffffff;
    padding: 80px 0 30px;
    border-top: 1px solid #eee;
}

footer h4, footer h6 {
    color: var(--primary-blue);
}

.footer-link {
    text-decoration: none;
    color: var(--text-muted);
    transition: 0.3s;
    display: block;
    margin-bottom: 10px;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    width: fit-content;
    cursor: pointer;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--primary-blue);
    padding-left: 5px;
}

/* ==================== CONTACTO ==================== */
.contact-info-box {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s;
}

.contact-info-box:hover {
    border-color: var(--primary-blue);
}

.contact-info-box h6 {
    font-size: 1.1rem;
}

.bg-soft-blue {
    background-color: rgba(0, 97, 255, 0.02);
}

/* ==================== COOKIES ==================== */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    z-index: 9999;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    display: none;
    max-width: 500px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-cookie-accept,
.btn-cookie-settings {
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.95rem;
}

.btn-cookie-accept {
    background: var(--primary-blue);
    color: white;
    flex: 1;
    min-width: 120px;
}

.btn-cookie-accept:hover {
    opacity: 0.9;
}

.btn-cookie-settings {
    background: #eee;
    color: var(--text-main);
}

.btn-cookie-settings:hover {
    background: #ddd;
}

/* ==================== MODAL ==================== */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}
.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 25px 30px;
}
.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}
.modal-title {
    color: var(--primary-blue);
    font-weight: 700;
}

/* ==================== MEDIA QUERIES - TABLET (991px) ==================== */
@media (max-width: 991px) {
    .hero {
        padding: 80px 0 40px;
        margin-top: 60px;
    }
    .section-padding {
        padding: 60px 0;
    }
    .navbar-logo {
        height: 50px;
        margin-right: 12px;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .card-service {
        padding: 25px;
    }
    .card-service h4 {
        font-size: 1.1rem;
    }
    .btn-primary-custom {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
    #cookie-banner {
        left: auto;
        right: 20px;
        bottom: 20px;
        max-width: 400px;
    }
}

/* ==================== MEDIA QUERIES - MOBILE (767px) ==================== */
@media (max-width: 767px) {
    body {
        font-size: 15px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    .navbar-logo {
        height: 40px;
        margin-right: 8px;
    }
    .nav-link {
        padding: 0.5rem 0 !important;
        margin: 5px 0 !important;
        font-size: 0.95rem;
    }
    
    .hero {
        padding: 70px 0 30px;
        margin-top: 60px;
    }
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    .hero p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    .hero-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .card-service {
        padding: 20px;
        border-radius: 18px;
        margin-bottom: 15px;
    }
    .card-service h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    .card-service p {
        font-size: 0.9rem;
    }
    .icon-wrapper {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .btn-primary-custom {
        padding: 12px 24px;
        font-size: 0.95rem;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .contact-info-box {
        padding: 18px;
        border-radius: 16px;
        margin-bottom: 15px;
    }
    .contact-info-box h6 {
        font-size: 1rem;
    }
    
    .form-label {
        font-size: 0.9rem !important;
    }
    .form-control,
    .form-select {
        font-size: 1rem;
        padding: 12px 15px !important;
    }
    
    footer {
        padding: 50px 0 20px;
    }
    footer h4 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    footer h6 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    .footer-link {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    #cookie-banner {
        left: 15px;
        right: 15px;
        bottom: 15px;
        padding: 20px;
        max-width: none;
    }
    #cookie-banner h5 {
        font-size: 1rem;
    }
    #cookie-banner p {
        font-size: 0.85rem;
    }
    .cookie-buttons {
        flex-direction: column;
    }
    .btn-cookie-accept,
    .btn-cookie-settings {
        width: 100%;
        padding: 12px 16px;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-header {
        padding: 20px;
    }
    .modal-body {
        padding: 20px;
        max-height: 80vh;
    }
    .modal-title {
        font-size: 1.1rem;
    }
}

/* ==================== MEDIA QUERIES - MOBILE PEQUEÑO (480px) ==================== */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    .navbar-logo {
        height: 35px;
        margin-right: 6px;
    }
    
    .hero {
        padding: 60px 0 20px;
        margin-top: 56px;
    }
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    .hero p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    .card-service {
        padding: 18px;
    }
    
    .btn-primary-custom {
        padding: 11px 20px;
        font-size: 0.9rem;
    }
    
    .icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    footer {
        padding: 40px 0 15px;
    }
    
    .contact-info-box {
        padding: 15px;
    }
    
    #cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-radius: 16px;
    }
    
    /* ==================== CARRUSEL RESPONSIVE MOBILE PEQUEÑO ==================== */
    #bricksCarousel .carousel-control-prev {
        left: -40px;
    }
    
    #bricksCarousel .carousel-control-next {
        right: -40px;
    }
    
    #bricksCarousel .carousel-control-prev,
    #bricksCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    #bricksCarousel .row.g-0 {
        flex-direction: column !important;
    }
    
    #bricksCarousel .col-md-6 {
        width: 100% !important;
    }
    
    #bricksCarousel .row.g-0 {
        padding: 25px 15px !important;
    }
    
    #bricksCarousel .row.g-0 h3 {
        font-size: 1.4rem !important;
    }
    
    #bricksCarousel .row.g-0 p {
        font-size: 0.85rem !important;
    }
    
    #bricksCarousel .row.g-0 .badge {
        font-size: 0.75rem;
    }
}

/* ==================== MEDIA QUERIES - MOBILE TABLET (768px) ==================== */
@media (max-width: 768px) {
    /* ==================== CARRUSEL RESPONSIVE MOBILE ==================== */
    #bricksCarousel .carousel-control-prev {
        left: 10px;
    }
    
    #bricksCarousel .carousel-control-next {
        right: 10px;
    }
    
    #bricksCarousel .carousel-control-prev,
    #bricksCarousel .carousel-control-next {
        width: 44px;
        height: 44px;
    }
    
    #bricksCarousel .carousel-control-prev i,
    #bricksCarousel .carousel-control-next i {
        font-size: 1rem;
    }
    
    #bricksCarousel .row.g-0 {
        flex-direction: column;
        padding: 30px 15px !important;
    }
    
    #bricksCarousel .col-md-6 {
        width: 100%;
        padding-left: 0 !important;
        margin-bottom: 20px;
    }
    
    #bricksCarousel .col-md-6 img {
        max-height: 250px;
    }
    
    #bricksCarousel .row.g-0 h3 {
        font-size: 1.5rem;
    }
    
    #bricksCarousel .row.g-0 p {
        font-size: 0.9rem;
    }
    
    #bricksCarousel .carousel-indicators {
        margin-top: 20px;
        padding-bottom: 10px;
    }
    
    #bricksCarousel .carousel-indicators button {
        width: 10px;
        height: 10px;
        margin: 0 6px;
    }
}
