/* SONORA BLOCK - Construcción Real de Bloques */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --gray: #64748b;
    --dark: #0f172a;
    --white: #ffffff;
    --concrete: #9ca3af;
    --concrete-dark: #6b7280;
    --mortar: #4b5563;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--dark);
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Unificado y Transparente */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.top-banner.scrolled {
    background: rgba(0, 0, 0, 0.7);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 4px;
    border-radius: 50px;
    flex-shrink: 0;
}

.lang-btn {
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

/* Todo en una línea */
.main-nav {
    display: none;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 0;
    flex: 1;
    justify-content: flex-end;
}

.nav-link {
    display: block;
    padding: 0.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    text-transform: uppercase;
    font-family: var(--font-display);
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 5px;
}

/* Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark), #1e293b);
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0.3;
}

/* Secciones con parallax necesitan position relative */
.products-section,
.works-section {
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    margin-bottom: 3rem;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
}

/* SISTEMA DE BLOQUES DE CONSTRUCCIÓN REAL */
.construction-section {
    position: relative;
    overflow: hidden;
}

.block-wall-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.block-row {
    display: flex;
    width: 100%;
    position: relative;
}

.concrete-block {
    width: 240px;
    height: 120px;
    background: linear-gradient(135deg, var(--concrete) 0%, var(--concrete-dark) 100%);
    border-right: 4px solid var(--mortar);
    border-bottom: 4px solid var(--mortar);
    position: relative;
    opacity: 0;
    transform: translateY(-100vh) rotate(-8deg) scale(0.7);
    animation: blockFall 1s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
    animation-play-state: paused;
}

/* Bloques en móviles - llenan toda la pantalla */
.concrete-block.mobile-block {
    width: 100% !important;
    height: 120px;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 2px solid var(--mortar);
    flex: 1;
}

.block-row:has(.mobile-block) {
    margin-left: 0 !important;
}

/* Textura de concreto */
.concrete-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 6px),
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 6px);
    pointer-events: none;
}

.concrete-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.2),
        inset 0 -2px 4px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* Animación de caída como lluvia */
@keyframes blockFall {
    0% {
        opacity: 0;
        transform: translateY(-150vh) rotate(calc(var(--rotation, -8deg))) scale(0.6);
    }
    30% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) rotate(calc(var(--rotation, 0deg) * 0.3)) scale(1.05);
    }
    70% {
        transform: translateY(5px) rotate(calc(var(--rotation, 0deg) * 0.1)) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

.concrete-block.visible {
    opacity: 1;
    animation-play-state: running;
}

/* Secciones */
section {
    position: relative;
}

.section-wrapper {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
    background: inherit;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.title-underline {
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    margin: 1rem auto 0;
    border-radius: 3px;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.8s 0.2s;
}

.title-underline.visible {
    opacity: 1;
    transform: scaleX(1);
}

/* About */
.about-section {
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 23px;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s;
    color: #fff;
}

.about-text p.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-image {
    border-radius: 1.5rem;
    overflow: hidden;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s;
}

.about-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-image img {
    width: 366px;
    height: auto;
    display: block;
}

/* Products */
.products-section {
    background: var(--dark);
    color: var(--white);
}

.products-section .section-title {
    color: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.product-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #1e293b;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 2rem;
}

.product-info h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.product-info p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

/* Services */
.services-section {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-item {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8fafc;
    border-radius: 1.5rem;
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.service-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.service-item h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-item p {
    line-height: 1.8;
    font-size: 1.0625rem;
}

/* Works */
.works-section {
    background: #f8fafc;
}

.works-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.work-item {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.work-item.visible {
    opacity: 1;
    transform: scale(1);
}

.work-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.work-item:hover img {
    transform: scale(1.1);
}

.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--white);
    padding: 2rem;
}

.work-overlay p {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
}

/* Contact */
.contact-section {
    background: var(--dark);
    color: var(--white);
}

.contact-section .section-title {
    color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.contact-item {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.contact-item strong {
    color: #60a5fa;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.contact-item span {
    font-size: 1.125rem;
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #25D366, #20ba5a);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
}

.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.75rem;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-social:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #60a5fa;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 160px;
}

.contact-form .btn-primary {
    width: 100%;
    text-align: center;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    flex: 1;
    max-width: 100px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.nav-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-display);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 6rem;
    margin-bottom: 90px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.footer-section h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #60a5fa;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #60a5fa;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2rem;
}

/* ============================================
   Media Queries - Responsive Design
   ============================================ */

/* Mobile First - Ajustes para móviles pequeños */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        padding: 0.75rem 1rem;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    .logo img {
        width: 40px;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .language-selector {
        order: 2;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .hero-content {
        padding: 1.5rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn-primary {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .section-wrapper {
        padding: 2rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .concrete-block.mobile-block {
        width: 100% !important;
        height: 100px;
        border-right: none !important;
        border-left: none !important;
    }
    
    .block-row {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* Todos los bloques en móvil ocupan ancho completo */
    .concrete-block {
        width: 100% !important;
    }
    
    .product-card,
    .service-item {
        padding: 1.5rem;
    }
    
    .product-image,
    .work-item {
        height: 250px;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .bottom-nav {
        padding: 0.75rem 0;
    }
    
    .nav-icon {
        font-size: 1.5rem;
    }
    
    .nav-label {
        font-size: 0.625rem;
    }
}

/* Tablets y móviles grandes */
@media (min-width: 481px) and (max-width: 767px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .header-content {
        padding: 0.875rem 1.5rem;
        gap: 1.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 1.25rem;
        font-size: 0.8125rem;
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
    }
    
    .section-wrapper {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .concrete-block.mobile-block {
        width: 100% !important;
        height: 110px;
        border-right: none !important;
        border-left: none !important;
    }
    
    .block-row {
        margin-left: 0 !important;
    }
    
    .concrete-block {
        width: 100% !important;
    }
    
    .product-image,
    .work-item {
        height: 300px;
    }
}

/* Tablets */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
    
    .header-content {
        padding: 1rem 2rem;
        flex-wrap: nowrap;
    }
    
    .nav-menu {
        order: initial;
        width: auto;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .concrete-block {
        width: 200px;
        height: 100px;
    }
    
    .section-wrapper {
        padding: 4rem 0;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .works-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .work-item {
        height: 450px;
    }
    
    .product-image {
        height: 320px;
    }
    
    .concrete-block:not(.mobile-block) {
        width: 240px;
        height: 120px;
    }
    
    .nav-link {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Desktop grande */
@media (min-width: 1280px) {
    .container {
        padding: 0 3rem;
    }
    
    .hero-content {
        padding: 3rem;
    }
    
    .section-wrapper {
        padding: 5rem 0;
    }
}

/* Ajustes para parallax en móviles - desactivar para mejor rendimiento */
@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll !important;
        opacity: 0.4;
    }
    
    .hero-section {
        min-height: 90vh;
    }
}

/* Ajustes para hover en dispositivos táctiles */
@media (hover: none) {
    .product-card:hover,
    .service-item:hover,
    .work-item:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* Orientación landscape en móviles */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-wrapper {
        padding: 2.5rem 0;
    }
}
