@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg: #0A0A0B;
    --surface: #161618;
    --accent: #D4AF37;
    --accent-hover: #B8962E;
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
}

h1, h2, h3 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
}

/* Common Utilities */
.mb-1 { margin-bottom: 1.5rem; }
.accent-title { color: var(--accent); margin-bottom: 1.5rem; }
.text-secondary { color: var(--text-secondary); }

/* Nosotros Section */
.nosotros-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem; 
    align-items: center;
}

.promise-card {
    padding: 2.5rem; 
    background: var(--glass); 
    border: 1px solid var(--accent);
}

.promise-card h4 {
    margin-bottom: 1rem; 
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .nosotros-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    z-index: 1001;
}

.logo-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #0b1120;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 2px solid var(--accent);
    padding: 5px;
    overflow: hidden;
    transition: var(--transition);
}

header.scrolled .logo-container {
    width: 60px;
    height: 60px;
    border-width: 1px;
}

.logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: scale(1.3);
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

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

.hero h1 {
    font-size: clamp(1.8rem, 6.5vw, 3.8rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--accent);
    display: block;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideAnim 24s infinite linear;
}

.slideshow .slide:nth-child(1) { animation-delay: 0s; }
.slideshow .slide:nth-child(2) { animation-delay: 8s; }
.slideshow .slide:nth-child(3) { animation-delay: 16s; }

@keyframes slideAnim {
    0% { opacity: 0; transform: scale(1); }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1.1); }
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--bg);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    height: 450px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.portfolio-item:hover {
    border-color: var(--accent);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    opacity: 0.7;
    transform-origin: center;
    animation: panImage 15s infinite alternate ease-in-out;
}

@keyframes panImage {
    0% { transform: scale(1); opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { transform: scale(1.15); opacity: 0.5; }
}

.portfolio-item:hover img {
    opacity: 0.3;
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    background: linear-gradient(transparent, rgba(10,10,11,0.9));
    transform: translateY(20px);
    transition: var(--transition);
}

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

.portfolio-info h3 {
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: var(--accent);
    font-weight: 600;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    transition: var(--transition);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateY(-10px);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    margin-bottom: 2rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

form {
    display: grid;
    gap: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s all ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Gallery Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(8px);
}
.modal-content {
    position: relative;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 90%;
    max-width: 1000px;
}
.gallery-slides {
    position: relative;
    width: 100%;
    height: 75vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.gallery-slide {
    display: none;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border-radius: 5px;
}
.gallery-slide.active {
    display: block;
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.close-modal {
    color: white;
    position: absolute;
    top: 25px;
    right: 45px;
    font-size: 3.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
}
.close-modal:hover {
    color: var(--accent);
    transform: scale(1.1);
}
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 15px 20px;
    color: white;
    font-weight: bold;
    font-size: 2rem;
    transition: var(--transition);
    user-select: none;
    background-color: rgba(0,0,0,0.6);
    border-radius: 3px;
    border: 1px solid transparent;
}
.next {
    right: -20px;
}
.prev {
    left: -20px;
}
.prev:hover, .next:hover {
    background-color: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* Mobile Menu Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(15deg);
    background-color: #128c7e;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .hero h1 { font-size: 3rem; }
    .contact-container { grid-template-columns: 1fr; }
    
    .hamburger { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 10, 11, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        display: flex;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .next { right: 0; }
    .prev { left: 0; }
    .close-modal { top: 10px; right: 20px; font-size: 2.5rem; }
}
