/* Modern Reset and Design Tokens */
:root {
    --primary: #F4B924; /* Elegant Gold */
    --primary-hover: #DDA317;
    --dark: #0F172A; /* Slate 900 */
    --darker: #020617; /* Slate 950 */
    --light: #F8FAFC;
    --gray: #64748B;
    --white: #FFFFFF;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    line-height: 1.7;
    background-color: var(--light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}

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

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #FF7B00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header (Glassmorphism) */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--dark);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

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

.nav-menu li a:hover {
    color: var(--primary);
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* Buttons */
.btn-primary, .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--darker);
    box-shadow: 0 10px 20px rgba(244, 185, 36, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(244, 185, 36, 0.4);
}

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

.btn-outline:hover {
    background: var(--dark);
    color: var(--white);
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transform: scale(1.05); /* Slight scale to make it feel grand */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.7) 40%, rgba(2, 6, 23, 0.3) 100%);
    z-index: -1;
}

.hero-content {
    width: 100%;
    max-width: 1280px;
    padding: 0 5%;
    margin-top: 80px; /* Offset for fixed header */
    animation: fadeInUp 1s ease forwards;
}

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

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(244, 185, 36, 0.15);
    border: 1px solid rgba(244, 185, 36, 0.3);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 25px;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: clamp(3.5rem, 6vw, 6rem);
    color: var(--white);
    font-weight: 800;
    margin-bottom: 25px;
    max-width: 800px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    color: #CBD5E1;
    max-width: 600px;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Services */
.services {
    padding: 120px 0;
    background: var(--light);
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--darker);
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.section-desc {
    color: var(--gray);
    font-size: 1.2rem;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 0;
    background: linear-gradient(135deg, var(--primary), #FF7B00);
    z-index: -1;
    transition: var(--transition);
}

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

.service-card:hover::before {
    height: 5px;
}

.card-icon {
    width: 65px;
    height: 65px;
    background: rgba(244, 185, 36, 0.1);
    color: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card:hover .card-icon {
    background: var(--primary);
    color: var(--white);
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(244, 185, 36, 0.2);
}

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

.service-card p {
    color: var(--gray);
    font-size: 1.05rem;
}

/* About / Projects */
.about {
    padding: 120px 0;
    background: var(--white);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}

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

.rounded-shadow {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.about-image {
    position: relative;
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--white);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 6px solid var(--primary);
}

.experience-badge .number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.experience-badge .text {
    font-weight: 700;
    color: var(--darker);
    text-transform: uppercase;
    font-size: 1rem;
    line-height: 1.3;
}

.about-subtitle {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--darker);
    font-weight: 800;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-text button{
    border: none;
}

/* ==========================================================================
   ESTILOS PREMIUM DEL POP-UP (DIALOG)
   ========================================================================== */
#pop {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0; /* Ensures it overrides any default margins */
  border: none;
  border-radius: 24px;
  padding: 40px;
  max-width: 1000px;
  width: 90%;
  max-height: 85vh;
  background-color: var(--white);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  font-family: var(--font-body);
}

/* Custom Scrollbar for Pop-up */
#pop::-webkit-scrollbar {
    width: 8px;
}
#pop::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 10px;
}
#pop::-webkit-scrollbar-thumb {
    background: var(--primary); 
    border-radius: 10px;
}

/* Modal Entrance Animation */
#pop[open] {
  animation: modalScaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

#pop::backdrop {
  background-color: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  animation: backdropFadeIn 0.3s ease forwards;
}

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

#pop h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--darker);
  margin-top: 0;
  margin-bottom: 35px;
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ==========================================================================
   CUADRÍCULA DE PROYECTOS (GRID RESPONSIVE)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* Tarjeta individual de proyecto */
.project-card {
  background-color: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  z-index: 1;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 0;
    background: linear-gradient(135deg, var(--primary), #FF7B00);
    z-index: -1;
    transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.project-card:hover::before {
    height: 4px;
}

.project-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.project-card h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--darker);
  margin: 20px 20px 10px;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.6;
  margin: 0 20px 25px;
}

/* ==========================================================================
   BOTÓN DE CIERRE
   ========================================================================== */
.btn-close {
  display: block;
  margin: 0 auto;
  background-color: var(--darker);
  color: var(--white);
  border: none;
  padding: 14px 40px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-close:hover {
  background-color: var(--primary);
  color: var(--darker);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(244, 185, 36, 0.3);
}

.about-text a {
    text-decoration: none;
    color: var(--white);
}

.feature-list {
    list-style: none;
    margin-top: 40px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--darker);
    font-size: 1.1rem;
}

.feature-list i {
    color: var(--primary);
    font-size: 1.4rem;
}

#contact{
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 10px auto;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.contact-input,
.contact-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: transparent;
    outline: none;
    transition: var(--transition);
}

.contact-input:focus,
.contact-textarea:focus {
    border-color: var(--primary);
}

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

.contact-label {
    position: absolute;
    left: 14px;
    top: 14px;
    font-size: 1rem;
    color: var(--gray);
    pointer-events: none;
    transition: all 0.3s ease;
    background-color: var(--light);
    padding: 0 4px;
}

.contact-input:focus ~ .contact-label,
.contact-input:not(:placeholder-shown) ~ .contact-label,
.contact-input:valid ~ .contact-label,
.contact-textarea:focus ~ .contact-label,
.contact-textarea:not(:placeholder-shown) ~ .contact-label {
    top: -10px;
    left: 10px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

#enviar_form {
    width: 110px;
    display: flex;
    justify-content: center;

}

#tipo_servicio {
   font-family: var(--font-body);
     border: 1px solid #ddd;
    color:#525a67d8;
    }
   
    #mensaje-estado{
        display: flex;
        justify-content: center;
        background-color: #CBD5E1;
        
    }

/* Footer (New 3-Column Design) */
.footer {
    background: black;
    padding: 80px 0 30px;
    color: var(--light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-links-col ul, .footer-contact-col ul {
    list-style: none;
}

.footer-links-col li {
    margin-bottom: 15px;
}

.footer-links-col a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links-col a i {
    font-size: 0.8rem;
    color: var(--primary);
    transition: var(--transition);
}

.footer-links-col a:hover {
    color: var(--primary);
}

.footer-links-col a:hover i {
    transform: translateX(5px);
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-left: 1px solid rgba(255,255,255,0.05);
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 0 20px;
}

.footer-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 20px;
}

.logo-text-footer h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--white);
    margin-bottom: 5px;
}

.logo-text-footer p {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

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

.social-icons a:hover {
    background: var(--primary);
    color: var(--darker);
    transform: translateY(-3px);
}

.footer-contact-col li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--gray);
}

.footer-contact-col li i {
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 5px;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .experience-badge {
        right: 20px;
        bottom: -20px;
        padding: 25px;
    }
    
    .experience-badge .number {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links-col a {
        justify-content: center;
    }
    
    .footer-center {
        border: none;
        padding: 0;
        order: -1;
    }
    
    .footer-contact-col li {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .header {
        position: relative;
        background: var(--white);
        padding: 10px 0;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-img {
        height: 60px; /* Smaller logo on mobile */
    }
    
    .nav-menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-outline {
        display: none; 
    }
    
    .hero {
        min-height: 100vh;
        height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-content {
        margin-top: 0;
        text-align: center;
    }
    
    .hero-overlay {
        background: rgba(2, 6, 23, 0.85); /* Slightly darker for better text readability */
    }
    
    .badge {
        margin: 0 auto 20px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .services {
        padding: 80px 0;
    }

    .about {
        padding: 80px 0;
    }

    /* Modal Mobile Adjustments */
    #pop {
        width: 95%;
        padding: 25px 20px;
        max-height: 90vh;
        border-radius: 16px;
    }

    #pop h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .projects-grid {
        gap: 20px;
        grid-template-columns: 1fr; /* Stack cards on very small screens */
    }
    
    .project-img {
        height: 180px;
    }

    .btn-close {
        width: 100%; /* Full width button on mobile for easy tapping */
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .nav-menu li a {
        font-size: 13px;
    }
    
    .experience-badge {
        position: relative;
        right: 0;
        bottom: 0;
        margin-top: -20px;
        border-left: none;
        border-top: 6px solid var(--primary);
        justify-content: center;
    }
}