/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta de colores inspirada en acero inoxidable */
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --light-gray: #ecf0f1;
    --medium-gray: #bdc3c7;
    --dark-gray: #7f8c8d;
    --white: #ffffff;
    --black: #2c3e50;
    --whatsapp: #25d366;
    --whatsapp-hover: #20b358;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --steel-gradient: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
    
    /* Tipografía */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Bordes */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(44, 62, 80, 0.08);
    border-bottom: 1px solid rgba(44, 62, 80, 0.05);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 4px 30px rgba(44, 62, 80, 0.12);
    border-bottom: 1px solid rgba(44, 62, 80, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 10;
}

.logo-link {
    display: block;
    transition: all 0.3s ease;
}

.logo-link:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 4px 8px rgba(44, 62, 80, 0.15));
}

.logo-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Ajuste para pantallas más pequeñas */
@media (max-width: 1024px) {
    .logo-image {
        width: 90px;
        height: 90px;
    }
    
    .nav-container {
        height: 80px;
    }
}

@media (max-width: 768px) {
    .logo-image {
        width: 80px;
        height: 80px;
    }
    
    .nav-container {
        height: 80px;
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .logo-image {
        width: 70px;
        height: 70px;
    }
    
    .nav-container {
        height: 80px;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    padding: var(--spacing-xs) 0;
}

.nav-link:hover {
    color: var(--accent-color);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.hamburger:hover {
    background: rgba(44, 62, 80, 0.05);
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-xxl) var(--spacing-md);
    padding-top: calc(var(--spacing-xxl) + 80px);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23000" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="%23000" opacity="0.02"/><circle cx="50" cy="10" r="1" fill="%23000" opacity="0.02"/><circle cx="10" cy="60" r="1" fill="%23000" opacity="0.02"/><circle cx="90" cy="40" r="1" fill="%23000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--steel-gradient);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-whatsapp:hover {
    background: var(--whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-whatsapp-large {
    background: var(--whatsapp);
    color: var(--white);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.btn-whatsapp-large:hover {
    background: var(--whatsapp-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Services Section */
.services {
    padding: var(--spacing-xxl) 0;
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.service-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: var(--steel-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    color: var(--dark-gray);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: var(--spacing-xxl) 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    margin-top: var(--spacing-xl);
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.about-text > p {
    color: var(--dark-gray);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-xl);
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.about-feature {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--steel-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.feature-content p {
    color: var(--dark-gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-stats {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    min-width: 300px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: var(--spacing-xs);
    line-height: 1.2;
}

/* Portfolio Section */
.portfolio {
    padding: var(--spacing-xxl) 0;
    background: var(--light-gray);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    padding: var(--spacing-lg);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    font-size: 1.2rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-xs);
}

.portfolio-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Contact Section */
.contact {
    padding: var(--spacing-xxl) 0;
    background: var(--white);
}

.contact-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr  ;
    gap: var(--spacing-xxl);
    margin-top: var(--spacing-xl);
    align-items: start;
}

.contact-info h3,
.contact-cta h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.contact-info p,
.contact-cta p {
    color: var(--dark-gray);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: var(--light-gray);
}

.contact-item i {
    width: 20px;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.contact-item span {
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
}

.contact-cta {
    background: linear-gradient(135deg, var(--light-gray) 0%, #e8f4f8 100%);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    text-align: center;
    border: 1px solid rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease;
}

.contact-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(52, 152, 219, 0.2);
}

.contact-map {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--light-gray);
}

.contact-map h4 {
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.contact-map .map-embed-wrapper {
    width: 100%;
    height: 300px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--light-gray);
    transition: all 0.3s ease;
}

.contact-map .map-embed-wrapper:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.contact-map .map-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(10%) contrast(1.05);
    transition: filter 0.3s ease;
}

.contact-map .map-embed-wrapper:hover iframe {
    filter: grayscale(0%) contrast(1.1);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
}

.footer-logo {
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: flex-start;
}

.footer-logo-image {
    width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
    opacity: 0.9;
}

.footer-logo-image:hover {
    opacity: 1;
    transform: scale(1.05);
}

.footer-brand p {
    color: var(--medium-gray);
    line-height: 1.6;
}

.footer-social h4 {
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-md);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--medium-gray);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.99);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--spacing-xl);
        transition: left 0.3s ease;
        box-shadow: 0 10px 40px rgba(44, 62, 80, 0.15);
        border-top: 1px solid rgba(44, 62, 80, 0.08);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: var(--spacing-lg) 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        font-weight: 500;
        padding: var(--spacing-sm) var(--spacing-lg);
        border-radius: var(--border-radius);
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: rgba(44, 62, 80, 0.05);
        color: var(--accent-color);
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -7px);
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: calc(var(--spacing-xl) + 80px) var(--spacing-md) var(--spacing-xl);
    }
    
    .hero-content {
        margin-bottom: var(--spacing-xl);
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image img {
        transform: none;
        max-width: 90%;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .about-image {
        order: -1;
    }
    
    .about-stats {
        position: static;
        margin-top: var(--spacing-md);
        min-width: auto;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-map .map-embed-wrapper {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-item {
        min-height: 250px;
    }
    
    .about-features {
        gap: var(--spacing-md);
    }
    
    .about-feature {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .contact-map .map-embed-wrapper {
        height: 180px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Focus states for accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #333333;
        --accent-color: #0066cc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}