/* ==================== PULIDOS SABANDO - STYLES CSS COMPLETO ==================== */

/* ==================== VARIABLES ==================== */
:root {
    --primary-color: #2d2d2d;
    --secondary-color: #4a4a4a;
    --accent-color: #1a1a1a;
    --text-light: #ffffff;
    --text-dark: #2d2d2d;
    --gray: #7a7a7a;
    --light-gray: #fafafa;
    --border-color: #e5e5e5;
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--text-light);
    font-size: 18px;
}

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==================== HEADER MEJORADO ==================== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 3rem;
    gap: 2rem;
}

/* Logo y Nav juntos a la izquierda */
.header-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-right: 2.5rem;
    border-right: 1px solid var(--border-color);
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    width: 160px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.logo-text {
    display: none;
}

nav {
    display: flex;
    align-items: center;
    padding-left: 2.5rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent-color);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Header derecha - Idiomas y Contacto */
.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.language-selector {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.lang-btn {
    width: 32px;
    height: 24px;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0.6;
    background: none;
    padding: 0;
}

.lang-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.lang-btn.active {
    opacity: 1;
    border-color: var(--accent-color);
}

.lang-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
}

.header-contact:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.header-contact-icon {
    font-size: 1rem;
}

/* Hero específico para la página de contacto */
.contact-hero {
    background-image: url('../img/portatil.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 8rem 2rem;
    position: relative;
}

.contact-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.contact-hero .hero-content {
    position: relative;
    z-index: 1;
}

/* ==================== HERO SECTION ==================== */
.hero {
    height: 100vh;
    background-image: url('../img/fondoChat.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 90%;
    backdrop-filter: blur(4px);
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.hero-logo {
    width: 320px;
    height: auto;
    margin: 0 auto 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.hero-logo:hover {
    transform: scale(1.02);
}

.hero-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-logo-placeholder {
    display: none;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    color: var(--text-dark);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
    font-weight: 300;
}

.hero .cta-button {
    background: var(--primary-dark);
    color: black;
    border: 1px solid black;
    border-radius: 6px;
    padding: 0.9rem 2rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero .cta-button:hover {
    background: #000;
    transform: translateY(-2px);
    color: white;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    height: 45vh;
    min-height: 350px;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
    border-bottom: 1px solid var(--border-color);
}

.page-header-content {
    text-align: center;
    color: var(--text-dark);
    animation: fadeInUp 0.8s ease;
    padding: 0 2rem;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 300;
}

/* ==================== BUTTONS ==================== */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    border-radius: 2px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.cta-button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==================== COMMON SECTIONS ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 4rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 1px;
    background: var(--accent-color);
}

/* ==================== SERVICES SECTION ==================== */
.services-preview {
    padding: 6rem 2rem;
    background: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    background: white;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

.service-image {
    width: 100%;
    height: 300px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray);
    position: relative;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content {
    padding: 2rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.service-card p {
    color: var(--gray);
    line-height: 1.8;
    font-size: 0.95rem;
    font-weight: 300;
}

/* ==================== WHY CHOOSE US ==================== */
.why-choose {
    padding: 6rem 2rem;
    background: var(--light-gray);
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.reason-box {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 0;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.reason-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

.reason-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.reason-box:hover .reason-icon {
    transform: scale(1.05);
}

.reason-box h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.reason-box p {
    color: var(--gray);
    line-height: 1.8;
    font-size: 0.95rem;
    font-weight: 300;
}

/* ==================== PROJECTS ==================== */
.projects-preview {
    padding: 6rem 2rem;
    background: var(--accent-color);
    color: var(--text-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.project-card {
    background: white;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.project-image {
    width: 100%;
    height: 280px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 2rem;
}

.project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 400;
}

.project-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    padding: 5rem 2rem;
    background: var(--light-gray);
    text-align: center;
    color: var(--text-dark);
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--gray);
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--accent-color);
    color: var(--text-light);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-weight: 400;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    line-height: 2;
    transition: color 0.3s ease;
    display: block;
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--text-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== SCROLL TO TOP BUTTON ==================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: var(--text-light);
    border: none;
    border-radius: 0;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-color);
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* ==================== RESPONSIVE DESIGN CORREGIDO ==================== */

/* ==================== TABLET GRANDE - 1200px ==================== */
@media (max-width: 1200px) {
    .header-container {
        padding: 0.8rem 2rem;
    }
    
    .logo-img {
        width: 140px;
    }
    
    .logo {
        padding-right: 2rem;
    }
    
    nav {
        padding-left: 2rem;
    }
    
    nav ul {
        gap: 2rem;
    }
    
    nav a {
        font-size: 0.85rem;
    }
    
    .header-right {
        gap: 1.5rem;
    }
    
    /* Ocultar hamburguesa en desktop */
    .mobile-menu-toggle {
        display: none;
    }
}

/* ==================== TABLET - 1024px ==================== */
@media (max-width: 1024px) {
    .header-container {
        padding: 1rem 1.5rem;
    }
    
    .logo-img {
        width: 130px;
    }
    
    .logo {
        padding-right: 1.5rem;
    }
    
    nav {
        padding-left: 1.5rem;
    }
    
    nav ul {
        gap: 1.2rem;
    }
    
    nav a {
        font-size: 0.82rem;
    }
    
    .header-contact {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .lang-btn {
        width: 28px;
        height: 21px;
    }
    
    /* Ocultar hamburguesa en desktop */
    .mobile-menu-toggle {
        display: none;
    }
}

/* ==================== MÓVIL/TABLET - 768px ==================== */
@media (max-width: 768px) {
    /* Header container en grid */
    .header-container {
        padding: 1rem 1.5rem;
        display: grid;
        grid-template-columns: 50px 1fr auto;
        grid-template-areas: "menu logo right";
        gap: 1rem;
        align-items: center;
    }
    
    /* Botón hamburguesa - VISIBLE */
    .mobile-menu-toggle {
        grid-area: menu;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--text-dark);
        padding: 0.5rem;
        transition: all 0.3s ease;
        width: 45px;
        height: 45px;
    }
    
    .mobile-menu-toggle:hover {
        background: var(--light-gray);
        border-radius: 4px;
    }
    
    .mobile-menu-toggle .hamburger-icon {
        display: block;
        transition: all 0.3s ease;
    }
    
    /* Logo en el centro */
    .logo {
        grid-area: logo;
        border-right: none;
        padding-right: 0;
        display: flex;
        justify-content: center;
    }
    
    .logo-img {
        width: 120px;
    }
    
    /* Banderas y teléfono a la derecha */
    .header-right {
        grid-area: right;
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }
    
    .language-selector {
        gap: 0.5rem;
    }
    
    .lang-btn {
        width: 28px;
        height: 21px;
    }
    
    /* Teléfono (solo icono) */
    .header-contact {
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }
    
    .header-contact span:not(.header-contact-icon) {
        display: none;
    }
    
    .header-contact-icon {
        font-size: 1rem;
    }
    
    /* Navegación - oculta y desplegable */
    nav {
        grid-column: 1 / -1;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
        padding: 0;
    }
    
    nav.mobile-open {
        display: block;
    }
    
    nav ul {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    
    nav ul li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
    }
    
    nav a::after {
        display: none;
    }
    
    nav a:hover,
    nav a.active {
        background: var(--light-gray);
    }
    
    /* Hero */
    .hero {
        height: 85vh;
        margin-top: 80px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-logo {
        width: 240px;
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
    
    /* Page header */
    .page-header {
        margin-top: 80px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
}

/* ==================== MÓVIL PEQUEÑO - 480px ==================== */
@media (max-width: 480px) {
    .header-container {
        padding: 0.8rem 1rem;
    }
    
    .header-left {
        gap: 0.8rem;
    }
    
    .logo-img {
        width: 100px;
    }
    
    nav a {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .header-right {
        gap: 0.8rem;
    }
    
    .lang-btn {
        width: 24px;
        height: 18px;
    }
    
    .header-contact {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .header-contact span:not(.header-contact-icon) {
        display: none;
    }
    
    .header-contact {
        width: 36px;
        height: 36px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-logo {
        width: 180px;
    }
    
    .hero-content {
        padding: 1.5rem 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    /* Page header */
    .page-header h1 {
        font-size: 1.8rem;
    }
}

/* ==================== MÓVIL MUY PEQUEÑO - 380px ==================== */
@media (max-width: 380px) {
    .header-container {
        padding: 0.8rem 0.8rem;
    }
    
    .logo-img {
        width: 80px;
    }
    
    .header-contact {
        width: 32px;
        height: 32px;
    }
    
    .lang-btn {
        width: 20px;
        height: 15px;
    }
    
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .hero-logo {
        width: 150px;
    }
}

/* ==================== DESKTOP - Restaurar estilos normales ==================== */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .header-left {
        width: auto;
        flex: 1;
    }
    
    .header-right {
        width: auto;
        padding-top: 0;
        border-top: none;
    }
    
    nav {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    nav ul {
        display: flex !important;
        flex-direction: row;
    }
    
    nav ul li {
        width: auto;
        border-bottom: none;
    }
}