:root {
    --primary-dark: #1a1a1a;
    --primary-light: #ffffff;
    --text-gray: #666666;
    --accent: rgba(253, 219, 81);
    --font-main: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); color: var(--primary-dark); background-color: var(--primary-light); overflow-x: hidden; }

/* Tipografía */
.subtitle { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-gray); margin-bottom: 10px; text-align: center; }
.subtitle-light { color: #aaaaaa; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
.section-title { font-size: 2.5rem; font-weight: 300; text-align: center; margin-bottom: 20px; line-height: 1.2; }
.section-title-light { font-size: 2.5rem; font-weight: 300; color: #fff; margin-bottom: 20px; }

/* Botones y UI */
.lang-btn { background: transparent; border: 2px solid var(--primary-dark); border-radius: 5px; padding: 5px 10px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.lang-btn:hover { background: var(--primary-dark); color: #fff; }

.btn-dark { display: inline-block; padding: 12px 30px; background-color: var(--primary-dark); color: #fff; text-decoration: none; border-radius: 30px; font-weight: 600; border: none; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.btn-dark:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); background-color: var(--accent); }

.btn-outline { display: inline-block; padding: 12px 30px; background-color: transparent; color: #fff; border: 1px solid #fff; text-decoration: none; border-radius: 30px; font-weight: 600; transition: all 0.3s; }
.btn-outline:hover { background-color: #fff; color: var(--primary-dark); transform: scale(1.05); }

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; background: rgba(253, 219, 81, 0.75); position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(10px); box-shadow: 0 2px 15px rgba(0,0,0,0.05); }
.logo h2 { font-weight: 700; font-size: 1.5rem; }
.logo span { font-weight: 300; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--primary-dark); font-weight: 600; font-size: 0.9rem; position: relative; transition: color 0.3s; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--primary-dark); transition: width 0.3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-icons { display: flex; align-items: center; gap: 20px; font-size: 1.2rem; }
.menu-toggle { display: none; cursor: pointer; }

/* Hero */
.hero { 
  padding: 80px 5% 40px; 
  text-align: center; 
  position: relative;
  background: 
    linear-gradient(to bottom, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 1) 100%),
    linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
    url('./Background.jpg');
  background-size: cover;
  background-position: center;
}
.hero-title { font-size: 3.5rem; font-weight: 300; margin-bottom: 50px; line-height: 1.1; }

.hero-gallery { display: flex; justify-content: center; align-items: flex-start; gap: 20px; height: 400px; margin-top: 40px; }
.gallery-item { width: 18%; height: 300px; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.item-1 { transform: translateY(60px) rotate(-5deg); }
.item-2 { transform: translateY(20px) rotate(-2deg); }
.item-3 { transform: translateY(0) scale(1.05); z-index: 2;}
.item-4 { transform: translateY(20px) rotate(2deg); }
.item-5 { transform: translateY(60px) rotate(5deg); }
.gallery-item:hover { transform: translateY(-15px) scale(1.1) !important; z-index: 10; box-shadow: 0 20px 30px rgba(0,0,0,0.3); }
.gallery-item:hover img { transform: scale(1.1); filter: brightness(1.1); }

/* About */
.about { padding: 80px 5%; text-align: center; background: linear-gradient(180deg, #fff 0%, #f9f9f9 100%); overflow: hidden; }
.about-text { max-width: 600px; margin: 0 auto 30px; color: var(--text-gray); line-height: 1.6; }
.about-images { display: flex; justify-content: center; align-items: center; margin-top: 60px; position: relative; height: 400px; }
.dynamic-img-wrapper { position: absolute; width: 250px; height: 350px; border-radius: 10px; overflow: hidden; box-shadow: 0 15px 30px rgba(0,0,0,0.2); transition: all 0.5s ease; cursor: pointer; }
.dynamic-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.img-left { transform: translateX(-150px) rotate(-10deg); z-index: 1; }
.img-center { z-index: 3; transform: scale(1.1); }
.img-right { transform: translateX(150px) rotate(10deg); z-index: 2; }
.dynamic-img-wrapper:hover { z-index: 10; transform: scale(1.2) translateY(-20px) rotate(0deg); box-shadow: 0 25px 40px rgba(0,0,0,0.4); }
.dynamic-img-wrapper:hover img { transform: scale(1.05); }

/* Preview Portafolio (Oscuro) */
.portfolio-dark { background-color: var(--primary-dark); color: #fff; padding: 100px 5%; border-top-left-radius: 60px; border-top-right-radius: 60px; margin-top: -40px; position: relative; z-index: 5; }
.portfolio-header { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 60px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.img-container { border-radius: 10px; overflow: hidden; height: 300px; margin-bottom: 15px; position: relative; }
.img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.img-container:hover img { transform: scale(1.15); opacity: 0.8; }
.project-info h3 { font-size: 1rem; font-weight: 600; letter-spacing: 1px; }

/* Página de Portafolio - Categorías y Grid */
.portfolio-page { padding: 60px 5% 100px; }
.intro-seo-text { max-width: 700px; margin: 0 auto 50px; text-align: center; color: var(--text-gray); font-size: 1.05rem; line-height: 1.6; }

.category-title-container { text-align: center; margin: 70px 0 30px; }
.category-title { font-size: 2rem; font-weight: 700; color: var(--primary-dark); display: inline-block; position: relative; padding-bottom: 15px; }
.category-title::after { content: ''; position: absolute; width: 60px; height: 4px; background-color: var(--accent); bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 2px; }

.masonry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.mt-large { margin-top: 50px; }
.masonry-item { border-radius: 15px; overflow: hidden; position: relative; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: transform 0.4s, box-shadow 0.4s; }
.masonry-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
.img-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); color: #fff; display: flex; justify-content: center; align-items: center; font-size: 3rem; opacity: 0; transition: opacity 0.3s; z-index: 2; }
.masonry-item:hover { transform: translateY(-10px); box-shadow: 0 20px 30px rgba(0,0,0,0.2); }
.masonry-item:hover img { transform: scale(1.1); }
.masonry-item:hover .img-overlay { opacity: 1; }

/* Lightbox Modal (Zoom Dinámico) */
.lightbox { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.95); backdrop-filter: blur(8px); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s; }
.lightbox.show { display: flex; opacity: 1; }
.close-lightbox { position: absolute; top: 25px; right: 40px; color: #fff; font-size: 45px; font-weight: 300; cursor: pointer; transition: color 0.3s; z-index: 10000; }
.close-lightbox:hover { color: var(--accent); }
.lightbox-content { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; animation: zoomIn 0.4s; }
.lightbox-img-container { width: 90vw; height: 80vh; display: flex; justify-content: center; align-items: center; overflow: hidden; }
#lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 5px; box-shadow: 0 0 40px rgba(0,0,0,0.8); transition: transform 0.1s ease-out; will-change: transform; }
.lightbox-footer { position: absolute; bottom: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); color: #fff; text-align: center; padding: 30px 20px 20px; font-size: 1.1rem; letter-spacing: 1px; font-weight: 300; z-index: 10; }

@keyframes zoomIn { from {transform: scale(0.8); opacity: 0;} to {transform: scale(1); opacity: 1;} }

/* Services Section */
.services { padding: 80px 5%; background-color: #fcfcfc; text-align: center; }
.services-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; margin-top: 50px; }
.service-card { background: #fff; width: calc(33.333% - 20px); min-width: 280px; padding: 40px 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; text-align: left; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.service-card i { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 20px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 15px; font-weight: 700; }
.service-card p { color: var(--text-gray); font-size: 0.95rem; line-height: 1.6; }

/* Footer */
.professional-footer { background-color: #1e1e1e; color: #e5e5e5; padding: 80px 5% 30px; border-top-left-radius: 60px; border-top-right-radius: 60px; margin-top: 20px; position: relative; z-index: 10; }
.footer-brand { text-align: center; margin-bottom: 60px; }
.footer-brand .brand-icon { font-size: 3rem; color: var(--accent); margin-bottom: 15px; }
.footer-brand h2 { font-size: 2.5rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-brand h2 span { font-weight: 300; }
.footer-brand p { font-style: italic; color: #a0a0a0; }
.footer-layout { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 40px; border-bottom: 1px solid #333; padding-bottom: 50px; margin-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 1.2rem; margin-bottom: 20px; font-weight: 600; }
.contact-info p { margin-bottom: 10px; color: #ccc; font-size: 0.95rem; }
.social-links-text { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.social-links-text a { color: #fff; text-decoration: none; font-size: 0.9rem; transition: color 0.3s; display: inline-block; }
.social-links-text a:hover { color: var(--accent); }
.pro-form { display: flex; flex-direction: column; gap: 12px; }
.pro-form input, .pro-form textarea { padding: 14px; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; color: #fff; font-family: inherit; transition: border 0.3s; }
.pro-form input:focus, .pro-form textarea:focus { outline: none; border-color: var(--accent); background-color: rgba(255, 255, 255, 0.1); }
.btn-accent { padding: 14px; background-color: var(--accent); color: #020202; border: none; border-radius: 30px; font-weight: 600; cursor: pointer; transition: background 0.3s, transform 0.2s; }
.btn-accent:hover { background-color: #e03e4c; transform: translateY(-2px); }
.quick-links ul { list-style: none; }
.quick-links ul li { margin-bottom: 12px; }
.quick-links ul li a { color: #ccc; text-decoration: none; transition: color 0.3s; font-size: 0.95rem; }
.quick-links ul li a:hover { color: #fff; }
.footer-bottom { text-align: center; font-size: 0.85rem; color: #888; }
.footer-bottom-links { display: inline-flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-bottom-links a { color: #888; text-decoration: none; transition: color 0.3s; }
.footer-bottom-links a:hover { color: #fff; }

/* Animaciones */
.fade-in { opacity: 0; transform: scale(0.95); transition: all 0.8s ease-out; }
.slide-up { opacity: 0; transform: translateY(40px); transition: all 0.8s ease-out; }
.is-visible { opacity: 1; transform: translate(0) scale(1); }

/* Responsive */
@media (max-width: 992px) {
    .hero-gallery { height: auto; flex-wrap: wrap; gap: 10px; }
    .gallery-item { width: 30%; height: 200px; transform: none !important; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card { width: calc(50% - 15px); }
    .footer-layout { grid-template-columns: 1fr 1fr; }
    .direct-form-col { grid-column: span 2; order: 3; margin-top: 20px; }
    .mt-large { margin-top: 0; }
}

@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: #fff; padding: 20px; box-shadow: 0 10px 10px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .hero-title { font-size: 2.2rem; }
    .about-images { height: 300px; }
    .dynamic-img-wrapper { width: 150px; height: 220px; }
    .img-left { transform: translateX(-80px) rotate(-10deg); }
    .img-right { transform: translateX(80px) rotate(10deg); }
    .masonry-grid { grid-template-columns: 1fr; }
    .service-card { width: 100%; }
    .footer-layout { grid-template-columns: 1fr; }
    .direct-form-col { grid-column: span 1; order: auto; }
    .professional-footer { border-top-left-radius: 40px; border-top-right-radius: 40px; }
}