:root {
    --primary: #003873;
    --secondary: #007BFF;
    --primary-dark: #002244;
    --accent: #25d366;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --text-color: #333;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    /* Offset for fixed header */
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    border-radius: var(--radius);
}

/* === Layout & Containers === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

section {
    padding: 5rem 0;
}

/* === Header === */
header {
    background: rgba(255, 255, 255, 0.98);
    /* Almost solid white for better logo blending */
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 90px;
    /* Controlled height */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--primary);
    font-size: 1.5rem;
}

.logo img {
    height: 90px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Highlight Catalog Link */
.nav-links a.catalog-link {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
}

.nav-links a.catalog-link:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

.nav-links a.catalog-link::after {
    display: none;
}

.lang-toggle {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.lang-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}


/* === History Section (Minimalist & Corporate) === */
#historia {
    background-color: #ffffff;
    padding: 6rem 0;
}

.history-header {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.history-top-logo {
    height: 60px;
    object-fit: contain;
    opacity: 0.9;
}

.section-title-minimal {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    position: relative;
}

.section-title-minimal::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.history-grid {
    display: flex;
    align-items: flex-start;
    /* Align top */
    justify-content: center;
    gap: 5rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Minimal Visuals */
.history-visuals-minimal {
    flex: 0 0 250px;
    /* Reduced for discrete elegance */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.founder-img-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    /* Very subtle radius, almost square */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    filter: sepia(10%) contrast(105%);
    /* Slight warmth */
}

.founder-caption {
    border-left: 2px solid var(--secondary);
    padding-left: 1rem;
    color: var(--primary-dark);
}

.founder-caption strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
}

.founder-caption span {
    font-size: 0.9rem;
    color: var(--gray);
    letter-spacing: 0.5px;
}

/* Minimal Text */
.history-text-minimal {
    flex: 1;
    padding-top: 1rem;
    /* Align visually with image face */
}

.history-intro-minimal {
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.minimal-separator {
    width: 60px;
    height: 2px;
    background: var(--light-gray);
    margin: 2.5rem 0;
}

.values-minimal {
    display: flex;
    gap: 3rem;
    margin-top: 1rem;
}

.value-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align structure */
    gap: 0.8rem;
    color: var(--gray);
}

.value-item i {
    font-size: 1.5rem;
    color: var(--primary);
    /* Corporate Blue */
    opacity: 0.8;
}

.value-item span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .history-grid {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
        text-align: center;
    }

    .history-visuals-minimal {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
    }

    .founder-caption {
        border-left: none;
        border-top: 2px solid var(--secondary);
        padding-left: 0;
        padding-top: 1rem;
    }

    .values-minimal {
        justify-content: center;
    }

    .value-item {
        align-items: center;
    }
}


/* === Hero Section === */
.hero {
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.95), rgba(0, 123, 255, 0.85)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 4rem 0 3rem;
    /* Significantly tighter padding */
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 90px;
}

.hero h1 {
    font-size: 2.8rem;
    /* Smaller, punchier title */
    margin-bottom: 0.8rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    /* Reduced space below text */
    opacity: 0.95;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    background: var(--white);
    color: var(--primary);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background: var(--light);
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary);
    color: white;
}

/* === Hero Key Features === */
.hero-features {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.hero-features li {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.hero-features i {
    color: var(--accent);
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Info Strip (Robustez) === */
.info-strip {
    background: var(--light);
    padding: 3rem 0;
    margin-top: -2rem;
    /* Pull up to overlap slightly or connect seamless */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 2;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: left;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0 1rem;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.info-item:last-child {
    border-right: none;
}

.info-item i {
    font-size: 2.5rem;
    color: var(--secondary);
    opacity: 0.8;
}

.info-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    color: var(--primary);
}

.info-item p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

@media (max-width: 900px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-item {
        border-right: none;
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .hero-features {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* === Services Grid === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover i {
    transform: scale(1.1);
    color: var(--primary);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* === Catalog Section (Teaser on Home) === */
.catalog-teaser {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.catalog-cta-box {
    background: white;
    padding: 4rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.catalog-cta-box h2 {
    color: var(--primary);
}

/* === Social Strip & Footer === */
.social-strip {
    background: white;
    padding: 3rem 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.social-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.social-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.social-icons-wrapper {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-8px) scale(1.1);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Brand Colors on Hover */
.social-icon.linkedin:hover {
    background: #0077b5;
    box-shadow: 0 10px 25px rgba(0, 119, 181, 0.4);
}

.social-icon.tiktok:hover {
    background: #000000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.social-icon.x:hover {
    background: #14171a;
    box-shadow: 0 10px 25px rgba(20, 23, 26, 0.4);
}

.social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 10px 25px rgba(220, 39, 67, 0.4);
}

.social-icon.facebook:hover {
    background: #1877f2;
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.4);
}

.social-icon.youtube:hover {
    background: #ff0000;
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.4);
}

footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === Catalog Page Styles === */
.filter-bar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--light-gray);
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--secondary);
    background: var(--secondary);
    color: white;
}

.search-input {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    width: 250px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--secondary);
}

@media (max-width: 600px) {
    .filter-bar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }

    .filter-bar>div {
        /* Target the search container */
        width: 100%;
        text-align: center !important;
    }

    .search-input {
        width: 100%;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        flex-grow: 1;
        /* Make buttons fill available space for easier tapping */
        text-align: center;
    }
}

.products-grid {
    display: grid;
    /* Reduced min-width to 260px to fit better on small mobile screens without horizontal scroll */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .products-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        /* On very small screens, 1 column is inevitable, but we ensure it takes full width */
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-card {
        max-width: 400px;
        /* Prevent card from being too wide on landscape mobile if 1 column */
        margin: 0 auto;
        width: 100%;
    }
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--light-gray);
}

.product-image-container {
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 480px) {
    .product-image-container {
        height: 200px;
        /* Smaller height for mobile to save vertical space */
    }
}

.product-image {
    height: 100%;
    width: 100%;
    object-fit: contain;
    /* Changed to contain for chairs */
    background: #fdfdfd;
    padding: 20px;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.product-model {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.product-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: var(--light-gray);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--dark);
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* === Clients Infinite Scroll === */
.clients-section {
    background: white;
    padding: 4rem 0;
    overflow: hidden;
}

.slider {
    margin: auto;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider::before,
.slider::after {
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    content: "";
    height: 100%;
    position: absolute;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.slider::after {
    right: 0;
    top: 0;
    transform: rotateZ(180deg);
}

.slider::before {
    left: 0;
    top: 0;
}

.slide-track {
    display: flex;
    width: calc(200px * 10);
    animation: scroll 30s linear infinite;
}

.slide-track:hover {
    animation-play-state: paused;
}

.slide {
    height: 100px;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide i,
.slide img {
    color: var(--gray);
    opacity: 0.5;
    transition: all 0.5s ease;
    filter: grayscale(100%);
    transform: scale(0.8);
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
}

.slide:hover i,
.slide:hover img {
    color: var(--primary);
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.2) rotate(5deg);
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-200px * 5));
    }
}

/* === Detailed Services Section === */
.services-detailed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns */
    gap: 1.5rem;
    /* Reduced gap slightly to ensure fit */
    padding-top: 2rem;
}

@media (max-width: 1024px) {
    .services-detailed-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2x2 on tablets */
    }
}

@media (max-width: 600px) {
    .services-detailed-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }
}

.service-card-detailed {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    border-bottom: 4px solid transparent;
}

.service-card-detailed:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-bottom-color: var(--secondary);
}

.service-image {
    height: 150px;
    /* Reduced height for elegance */
    width: 100%;
    position: relative;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card-detailed:hover .service-image img {
    transform: scale(1.15);
}

.service-icon-overlay {
    position: absolute;
    bottom: 15px;
    /* Moved up to be fully visible inside image */
    right: 15px;
    width: 50px;
    /* Slightly smaller */
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Softer shadow */
    z-index: 2;
}

.service-icon-overlay i {
    color: var(--secondary);
    font-size: 1.4rem;
    /* Adjusted icon size */
}

.service-content {
    padding: 1.5rem;
    /* Reduced padding */
}

.service-content h3 {
    font-size: 1.25rem;
    /* Refined title size */
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.service-content p {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: var(--dark);
}

.service-list li i {
    color: var(--accent);
    font-size: 0.9rem;
    min-width: 20px;
}

/* === Scroll Animations === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* Print Styles */
@media print {

    header,
    .catalog-filter,
    .btn-whatsapp,
    footer,
    .slider-wrapper+button,
    /* Hide slider arrows */
    .admin-section button,
    .admin-header button,
    #productForm,
    .login-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .products-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }

    .product-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .product-image-container {
        height: 150px !important;
    }

    .product-title {
        font-size: 1rem;
    }

    .feature-tag {
        border: 1px solid #ccc;
        background: none !important;
        color: black !important;
    }
}