/* ============================================
   Variables y Reset
   ============================================ */
:root {
    --primary-color: #FFD700;
    --secondary-color: #000000;
    --accent-color: #FFA500;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ============================================
   Container y Utilidades
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto 20px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

.btn-secondary:hover {
    background-color: var(--bg-white);
    color: var(--secondary-color);
}

/* ============================================
   Navegación
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 60px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.btn-contacto {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 25px;
    border-radius: 50px;
}

.btn-contacto::after {
    display: none;
}

.btn-contacto:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #333333 100%);
    overflow: hidden;
    margin-top: 90px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23FFD700" opacity="0.05" width="1200" height="600"/><path d="M0,300 Q300,100 600,300 T1200,300 L1200,600 L0,600 Z" fill="%23FFD700" opacity="0.1"/></svg>');
    background-size: cover;
    background-position: center;
}

.hero-content {
    text-align: center;
    color: var(--bg-white);
    z-index: 1;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-color);
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-15px);
    }
    60% {
        transform: translateX(-50%) translateY(-8px);
    }
}

/* ============================================
   Sobre Nosotros
   ============================================ */
.about {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.about-card {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.about-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.company-info {
    background-color: var(--bg-white);
    padding: 50px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.company-info h3 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-item i {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.info-item strong {
    display: block;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   Servicios
   ============================================ */
.services {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background-color: var(--bg-light);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 3px solid transparent;
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--secondary-color), #333333);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.service-icon i {
    font-size: 3rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card:hover .service-icon i {
    color: var(--secondary-color);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   Características
   ============================================ */
.features {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--secondary-color), #333333);
    color: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

/* ============================================
   Galería de Proyectos
   ============================================ */
.gallery {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    padding: 20px;
    color: var(--bg-white);
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover .gallery-content {
    transform: translateY(0);
}

.gallery-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.gallery-content p {
    font-size: 1rem;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.btn-view {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-view:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* CTA en galería */
.gallery-cta {
    background: linear-gradient(135deg, var(--secondary-color), #333333);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.gallery-cta-content {
    text-align: center;
    color: var(--bg-white);
}

.gallery-cta-content i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.gallery-cta-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--bg-white);
}

.gallery-cta-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.8);
}

/* Modal para imágenes */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 85vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease;
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--primary-color);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.modal-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.modal-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--bg-white);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    text-align: center;
    max-width: 80%;
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 15px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10000;
}

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

.modal-prev:hover,
.modal-next:hover {
    background-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ============================================
   Contacto
   ============================================ */
.contact {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3,
.contact-form-wrapper h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.contact-description {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Formulario de Contacto */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-submit:hover {
    gap: 15px;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--secondary-color);
    color: var(--bg-white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 20px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
    color: var(--primary-color);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    color: var(--secondary-color);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 40px 20px;
        gap: 20px;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero {
        height: 80vh;
        margin-top: 90px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .company-info {
        padding: 30px 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-item {
        min-height: 300px;
    }
    
    .modal-prev,
    .modal-next {
        padding: 10px 15px;
        font-size: 1.2rem;
    }
    
    .modal-prev {
        left: 15px;
    }
    
    .modal-next {
        right: 15px;
    }
    
    .modal-close {
        right: 20px;
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .about-grid,
    .services-grid,
    .features-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 70vh;
    }
    
    .modal-caption {
        font-size: 0.9rem;
        padding: 10px 20px;
        bottom: 15px;
    }
    
    .gallery-cta-content h3 {
        font-size: 1.4rem;
    }
    
    .gallery-cta-content i {
        font-size: 3rem;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}