/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    /* Brand Colors */
    --primary: #F49600;
    /* Naranja industrial */
    --secondary: #5F5E5E;
    /* Gris oscuro */
    --bg-light: #F2F4F6;
    /* Gris muy claro */
    --bg-dark: #1F2123;
    /* Darker slate for heavy contrasts */
    --text-dark: #1A1A1A;
    --text-light: #F9F9F9;
    --text-muted: #848484;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Spacing & Defaults */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    /* Prevent scroll bounce */
    /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow selection in form elements */
input,
textarea,
select {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

#scroll-wrapper {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: none;
    /* Prevent scroll bounce */
    /* Default to native scroll for mobile */
}

@media (min-width: 768px) {
    #scroll-wrapper {
        overflow: hidden;
        /* Fully controlled via JS smooth scroll to avoid OS bounce on desktop */
    }
}

/* Base sections styling */
section {
    width: 100%;
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Prevent image dragging */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.text-primary {
    color: var(--primary);
}

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

.bg-dark {
    background-color: var(--bg-dark);
}

.text-light {
    color: var(--text-light);
}

/* ==========================================================================
   Layout Classes
   ========================================================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grids-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

@media (min-width: 768px) {
    .grids-2 {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

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

/* Buttons */
.btn-cta,
.btn-outline,
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-cta {
    color: var(--bg-dark);
    box-shadow: 0 4px 14px rgba(244, 150, 0, 0.3);
}

.btn-cta:hover,
.btn-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 150, 0, 0.4);
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ==========================================================================
   Typography Helpers
   ========================================================================== */
.section-top-title {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    line-height: 1.1;
}

.bg-dark .section-title {
    color: var(--text-light);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
    background-color: rgba(242, 244, 246, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transform: translateY(-100%);
    /* Hidden initially, shown via JS */
    transition: transform 0.5s ease-out;
}

#main-header.visible {
    transform: translateY(0);
}

#main-header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    width: 150px;
    height: 50px;
    display: flex;
    align-items: center;
}

.nav-links {
    display: none;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
}

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

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

/* ==========================================================================
   Hero Section & Scroll Experience
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to bottom, rgba(31, 33, 35, 0.7), rgba(31, 33, 35, 0.4), var(--bg-light)),
        url("./public/hero-bg.webp");
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
}

.hero-logo-wrapper {
    margin: 0 auto 2rem;
    width: 350px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Set up for JS scroll animation */
    transition: all 0.1s linear;
}

.pas-logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4));
}

/* Animation states when scrolling happens, controlled by JS */
.logo-animating {
    position: fixed !important;
    z-index: 1001;
}

.hero-title {
    color: white;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--primary);
    opacity: 0.8;
    animation: bounce 2s infinite ease-in-out;
    z-index: 20;
    cursor: pointer;
}

.scroll-indicator .material-symbols-outlined {
    font-size: 2.5rem;
    line-height: 0.5;
}

.scroll-indicator .material-symbols-outlined:nth-child(2) {
    margin-top: -10px;
    opacity: 0.5;
}

@keyframes bounce {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 15px);
    }
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */
.fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

/* ==========================================================================
   Nosotros Section
   ========================================================================== */
.about-section {
    padding: 6rem 0;
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-image {
    position: relative;
}

.image-accent {
    position: absolute;
    top: -2.5rem;
    left: -2.5rem;
    width: 8rem;
    height: 8rem;
    background-color: rgba(244, 150, 0, 0.2);
    border-radius: 50%;
    filter: blur(40px);
}

.about-image img {
    border-radius: 1rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-left: 8px solid var(--primary);
}

.experience-badge {
    position: absolute;
    bottom: -1.5rem;
    right: -1.5rem;
    background-color: var(--primary);
    padding: 1.5rem;
    border-radius: 1rem;
    z-index: 3;
    box-shadow: 0 10px 25px rgba(244, 150, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.experience-badge .number {
    color: var(--bg-dark);
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.experience-badge .text {
    color: var(--bg-dark);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.about-content p {
    color: var(--secondary);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bg-dark);
}

/* ==========================================================================
   Servicios Section
   ========================================================================== */
.services-section {
    padding: 6rem 0;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.services-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .services-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.services-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 500px;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 2.5rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 260px;
    justify-content: center;
}

.service-card .icon,
.service-card .service-svg-icon {
    font-size: 2.5rem;
    display: block;
    transition: transform 0.4s ease;
}

.service-card .service-svg-icon {
    width: 85px;
    height: 85px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0;
    transition: transform 0.4s ease;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
}

/* Hover Interaction for Cards */
.service-hover-content {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.service-card p {
    color: var(--bg-dark);
    font-weight: 500;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.service-card:hover {
    background-color: var(--primary);
}

.service-card:hover .icon,
.service-card:hover .service-svg-icon,
.service-card:hover h3 {
    color: var(--bg-dark);
    transform: translateY(-55px);
}

.service-card:hover .service-hover-content {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Portfolio Section
   ========================================================================== */
.portfolio-section {
    padding: 6rem 0;
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.portfolio-item {
    aspect-ratio: 1/1;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-item .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(244, 150, 0, 0.85);
    /* Primary with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.portfolio-item .overlay span {
    color: var(--bg-dark);
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    text-align: center;
    padding: 1rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

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

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    padding: 6rem 0;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-desc {
    color: var(--secondary);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-bubble {
    width: 3rem;
    height: 3rem;
    background-color: rgba(244, 150, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
}

.contact-item .value {
    font-weight: 700;
    color: var(--bg-dark);
}

.contact-form-container {
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.whatsapp-form .form-group {
    margin-bottom: 1.5rem;
}

.whatsapp-form label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.whatsapp-form input,
.whatsapp-form select,
.whatsapp-form textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e1e1e1;
    background-color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--bg-dark);
    transition: var(--transition);
}

.whatsapp-form textarea {
    resize: none;
}

.whatsapp-form input:focus,
.whatsapp-form select:focus,
.whatsapp-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 150, 0, 0.2);
}

.char-counter {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--secondary);
    margin-top: 0.4rem;
    padding-right: 0.5rem;
}

.whatsapp-form .btn-submit {
    width: 100%;
    margin-top: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.footer-pas-img {
    height: 60px;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

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