/* --- Variables & Reset --- */
:root {
    --primary-color: #B25E22;
    /* Warm wood tone, vibrant */
    --secondary-color: #1a2530;
    /* Dark slate/Navy for industrial feel */
    --accent-color: #e67e22;
    /* Highlighting orange */
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-fast: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--light-bg);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--primary-color);
    transition: var(--transition-fast);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid transparent;
    display: inline-block;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--text-dark);
}

.full-width {
    width: 100%;
    justify-content: center;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    /* Adjust based on logo file aspect ratio */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

.nav-cta {
    padding: 10px 20px !important;
    border-radius: 6px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background-image: url('../assets/Palets%20apilados.webp');
    /* Local asset update */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-subtitle {
    display: inline-block;
    color: #ffd54f;
    /* Luminous amber */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-title .highlight {
    color: #ffAB40;
    /* Brighter orange accent */
}

.hero-description {
    font-size: 1.2rem;
    color: #ffffff;
    /* Pure white for max brightness */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* --- Trust Bar --- */
.trust-bar {
    background-color: var(--secondary-color);
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.trust-item {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: width 0.3s ease, opacity 0.3s ease;
    /* Fix: transition property syntax */
}

.trust-item:hover {
    opacity: 1;
    color: var(--primary-color);
}

.trust-item i {
    font-size: 1.5rem;
}

/* --- General Section Styles --- */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.text-center {
    text-align: center;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.img-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: var(--white);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(178, 94, 34, 0.3);
}

.experience-badge .number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.about-features {
    margin-top: 30px;
}

.about-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    color: var(--secondary-color);
}

.about-features i {
    color: var(--primary-color);
}

/* --- Services Section --- */
.services {
    background-color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    background: transparent;
    perspective: 1000px;
    height: 350px;
    /* Fixed height required for 3D flip */
    cursor: pointer;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

.service-card.flipped .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.service-card-front {
    background: var(--light-bg);
    color: var(--text-dark);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-card:hover .service-card-front {
    background-color: var(--white);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.service-card-back {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
}

.service-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card .icon-box {
    width: 60px;
    height: 60px;
    background: rgba(178, 94, 34, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: var(--transition-fast);
}

.service-card:hover .icon-box {
    background: var(--primary-color);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Technical Catalog Section --- */
.catalog {
    background-color: var(--white);
    /* Pure white background */
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    /* Light gray border */
    border-radius: 8px;
    padding: 30px;
    transition: var(--transition-fast);
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.product-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-dark);
    /* Dark title */
}

.product-tag {
    background-color: #f8fafc;
    color: var(--text-light);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.product-specs li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.product-specs strong {
    color: var(--text-light);
    font-weight: 500;
}

.product-specs .highlight-spec {
    color: var(--accent-color);
    /* Orange highlight */
    font-weight: 700;
}

.catalog-cta {
    margin-top: 40px;
}

/* --- Regulations Section --- */
.regulations {
    background: var(--secondary-color);
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    background-image: url('https://images.unsplash.com/photo-1587293852726-70cdb56c2866?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-attachment: fixed;
    /* Parallax basic */
    background-size: cover;
}

.regulations h2,
.regulations h3 {
    color: var(--white);
}

.regulations-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    z-index: 1;
}

.regulations-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.reg-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 20px;
    color: var(--accent-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ht-explanation {
    margin-top: 50px;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ht-explanation strong {
    color: var(--accent-color);
}

/* --- Contact Section --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.05);
}

.contact-info {
    background: var(--secondary-color);
    color: var(--white);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-item .icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
}

.info-item h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.info-item p {
    color: #cbd5e1;
}

.contact-form-box {
    padding: 50px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- Footer --- */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    /* Make logo white for footer */
    opacity: 0.8;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 25px;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.social-icons a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
    color: #64748b;
}

/* --- Reveal/Animation Utilities --- */
.reveal-text,
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: all var(--transition-smooth);
}

.reveal-text {
    transform: translateY(20px);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-visible {
    opacity: 1;
    transform: translate(0, 0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* --- WhatsApp Widget --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
    color: #FFF;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* --- Responsive: Tablet (max-width: 768px) --- */
@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 0 20px;
    }

    /* Navigation */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: 0.4s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-description {
        font-size: 1rem;
        max-width: 100%;
    }

    .hero-btns {
        flex-direction: column;
        gap: 12px;
    }

    .hero-btns .btn-primary,
    .hero-btns .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Trust Bar */
    .trust-bar {
        padding: 20px 0;
    }

    .trust-logos {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        justify-items: center;
    }

    .trust-item {
        font-size: 0.9rem;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .trust-item i {
        font-size: 1.3rem;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-img {
        order: -1;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        height: 300px;
    }

    .service-card-front {
        padding: 30px 20px;
    }

    /* Catalog */
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card {
        padding: 25px 20px;
    }

    .product-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    /* Regulations */
    .regulations {
        background-attachment: scroll;
        padding: 60px 0;
    }

    .ht-explanation {
        padding: 25px;
    }

    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-info {
        padding: 30px 20px;
        gap: 25px;
    }

    .contact-form-box {
        padding: 30px 20px;
    }

    /* Buttons - touch-friendly minimum height */
    .contact-info .btn-secondary {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Map */
    .map-container {
        margin-top: 20px !important;
    }

    .map-container iframe {
        width: 100%;
        height: 220px;
    }

    /* Section spacing */
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer-brand,
    .footer-links,
    .footer-social {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer {
        padding-top: 50px;
    }

    /* WhatsApp */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}

/* --- Responsive: Mobile (max-width: 480px) --- */
@media (max-width: 480px) {

    /* Hero */
    .hero-title {
        font-size: 1.9rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }

    /* Trust Bar - 2 columns on small screens */
    .trust-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .trust-item {
        font-size: 0.8rem;
    }

    .trust-item span {
        font-size: 0.7rem;
    }

    /* Services */
    .service-card {
        height: 280px;
    }

    .service-card-front {
        padding: 25px 15px;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    .service-card .icon-box {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    /* Catalog */
    .product-card {
        padding: 20px 15px;
    }

    .product-header h3 {
        font-size: 1.1rem;
    }

    .product-specs li {
        font-size: 0.85rem;
    }

    .catalog-cta .btn-primary {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 14px 20px;
    }

    /* About */
    .about-features li {
        font-size: 0.9rem;
    }

    /* Contact */
    .contact-info {
        padding: 25px 15px;
        gap: 20px;
    }

    .contact-form-box {
        padding: 25px 15px;
    }

    .info-item {
        gap: 12px;
    }

    .info-item h4 {
        font-size: 1rem;
    }

    .contact-info .btn-secondary {
        font-size: 0.8rem !important;
        padding: 10px 14px !important;
        min-height: 44px;
        word-break: break-all;
    }

    /* Map */
    .map-container iframe {
        height: 180px;
    }

    /* Section spacing */
    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    /* Regulations */
    .regulations {
        padding: 40px 0;
    }

    .regulations h2 {
        font-size: 1.4rem;
    }

    .ht-explanation {
        padding: 20px 15px;
    }

    /* Footer */
    .footer {
        padding-top: 40px;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }

    /* WhatsApp - smaller to avoid blocking footer */
    .whatsapp-float {
        width: 46px;
        height: 46px;
        font-size: 22px;
        bottom: 15px;
        right: 15px;
    }
}