/* css/style.css */

/* Base Styles & Font */
html {
    scroll-behavior: smooth; /* Ensures smooth scrolling for anchor links */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #1A1A1A; /* Dark matte black background */
    color: #E0E0E0; /* Light gray for general text on dark background */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Customizing Tailwind defaults for consistency */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700; /* Bold by default for headings */
    color: #F5F5F5; /* Lighter color for headings */
}

/* Container for consistent width */
.container {
    max-width: 1200px; /* Adjust as needed */
    margin-left: auto;
    margin-right: auto;
}

/* Top Header Specifics */
.top-header {
    background-color: #222222; /* Slightly lighter dark for top header */
    border-bottom: none; /* Removed border */
    color: #BBBBBB; /* Lighter gray for text */
}

.top-header a {
    display: inline-flex;
    align-items: center;
}

.top-header i {
    color: #888888; /* Gray icon color */
}

/* Header / Navigation Specifics */
.header {
    background-color: #282828; /* Darker background for main header */
    box-shadow: none; /* Removed shadow */
    border-bottom: none; /* Removed border */
}

.header .logo a {
    font-weight: 800; /* Extra bold for logo */
    color: #F5F5F5; /* Lighter color for logo */
}

.logo a img {
    width: 200px;
}

.main-nav ul li a {
    position: relative;
    padding-bottom: 5px; /* Space for underline effect */
    color: #CCCCCC; /* Lighter gray for nav links */
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #00BFFF; /* Bright blue for underline */
    transition: width 0.3s ease-in-out;
}

.main-nav ul li a:hover::after {
    width: 100%;
}

.main-nav ul li a:hover {
    color: #00BFFF; /* Bright blue on hover */
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px; /* Slightly more rounded */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.btn-primary.bg-fuchsia-600 { /* This class is used in HTML for offers button, but it's removed now. Keeping for safety. */
    background-color: #00BFFF; /* Bright blue */
}
.btn-primary.bg-fuchsia-600:hover {
    background-color: #009ACD; /* Darker blue */
}

/* Banner Section */

.banner-dynamic-bg .banner-image {
    transition: opacity 1s ease-in-out;
}

.banner-dynamic-bg .banner-image.active {
    opacity: 1;
}

/* Gradient Overlay for Banner */
.parallax-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 70%, #1A1A1A 100%); /* Gradient to match body background */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Below text, above background images */
}

.banner-dynamic-bg {
    z-index: 1; /* Ensure background is behind overlay and text */
}

#inicio .relative.z-10 {
    z-index: 10; /* Ensure text is above overlay */
    color: #F5F5F5; /* White text for banner */
}

/* Product Section */
#productos {
    background-color: #1A1A1A; /* Match body background */
    color: #E0E0E0;
}

#productos h2 {
    color: #F5F5F5;
}

.product-card {
    background-color: #282828; /* Darker card background */
    border: none; /* Removed border */
    box-shadow: none; /* Removed shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); /* Kept hover shadow for interaction */
}

.product-card h3 {
    color: #F5F5F5; /* Lighter heading */
}

.product-card p {
    color: #BBBBBB; /* Lighter text */
}

.btn-product-details {
    color: #00BFFF; /* Bright blue */
    border-bottom: 2px solid transparent;
}

.btn-product-details:hover {
    border-color: #00BFFF; /* Bright blue underline on hover */
}

/* Catálogo Section */
#catalogo {
    background: linear-gradient(to bottom, #1A1A1A 0%, #222222 100%); /* Subtle gradient for catalogue */
    color: #E0E0E0;
}

#catalogo h2 {
    color: #F5F5F5;
}

#catalogo p {
    color: #BBBBBB;
}

#catalogo .bg-white { /* For iframe container */
    background-color: #282828;
    border: none; /* Removed border */
    box-shadow: none; /* Removed shadow */
}

#catalogo iframe {
    background-color: #333333; /* Darker background for iframe if PDF doesn't load */
}

#catalogo a.text-blue-600 { /* For download link in iframe fallback */
    color: #00BFFF;
}

#catalogo .bg-blue-600 { /* For download button */
    background-color: #00BFFF;
}

#catalogo .bg-blue-600:hover {
    background-color: #009ACD;
}


/* Company History Section */
#empresa {
    background-color: #1A1A1A; /* Match body background */
    color: #E0E0E0;
}

#empresa h2 {
    color: #F5F5F5;
}

#empresa p {
    color: #BBBBBB;
}

/* Tab Styles */
.tabs-nav .tab-item {
    color: #BBBBBB;
}

.tabs-nav .tab-item.active {
    color: #00BFFF; /* Bright blue for active tab text */
    border-color: #00BFFF; /* Bright blue for active tab underline */
}

.tab-content {
    /* Initial state for zoom out and fade out */
    opacity: 0;
    transform: scale(0.8);
    visibility: hidden; /* Hidden from screen readers and interaction */
    pointer-events: none; /* Prevents clicks when hidden */
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0s linear 0.3s; /* Transition opacity/transform, then hide visibility after transition */
    position: absolute; /* Position absolute to prevent layout shifts during transition */
    width: 100%; /* Ensure it takes full width when absolute */
    top: 0; /* Align to top of wrapper */
    left: 0; /* Align to left of wrapper */
}

.tab-content h3 {
    color: #F5F5F5;
}

.tab-content p {
    color: #BBBBBB;
}

.tab-content i.text-blue-500 { /* This class from HTML needs to be mapped to new color */
    color: #00BFFF; /* Bright blue for icons */
}

.tab-content .fab {
    color: #888888;
}

.tab-content .fab:hover {
    color: #00BFFF;
}

.tab-content.active-tab {
    opacity: 1;
    transform: scale(1);
    visibility: visible; /* Visible */
    pointer-events: auto; /* Allows interaction */
    transition: opacity 0.3s ease-out, transform 0.3s ease-out; /* No delay on visibility when active */
}

.tab-content.hidden {
    display: none; /* Hide from layout when not active */
}

.tab-content-wrapper {
    position: relative;
    min-height: 250px; /* Set a min-height to prevent wrapper collapse during transitions */
}

.box-history-img img {
    width: 40%;
    margin: auto;
    display:block;
}

.text-base {
    text-align: justify;
}

/* Corporate Image Card for History Section */
.corporate-image-card {
    background-color: #282828; /* Darker background for the card */
    border: none; /* Removed border */
    box-shadow: none; /* Removed shadow */
}

.corporate-image-card img {
    filter: grayscale(80%) brightness(50%); /* More pronounced grayscale and darker */
    opacity: 0.8; /* Slightly less opaque */
}

.corporate-image-card .bg-blue-900 {
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay to match theme */
}

.corporate-image-card h3 {
    color: #F5F5F5;
}

.corporate-image-card a.bg-white {
    background-color: #EEEEEE; /* Slightly off-white for button */
    color: #2563EB; /* Original blue for button text */
}

.corporate-image-card a.bg-white:hover {
    background-color: #DDDDDD;
}


/* Contact Form - Updated Flat & Elegant Style */
#contacto {
    background-color: #1A1A1A; /* Match body background */
    color: #E0E0E0;
}

#contacto h2 {
    color: #F5F5F5;
}

.contact-form-wrapper {
    margin-top: 20px;
}

.contact-form-layout {
    background-color: #222222; /* Form background, slightly lighter than section */
    box-shadow: none; /* Removed shadow */
    border: none; /* Removed border */
    padding: 3rem; /* Generous padding for the entire form container */
    border-radius: 12px; /* More rounded corners for the container */
}

.contact-form-layout p {
    color: #BBBBBB;
}

.contact-form-layout h3 {
    color: #F5F5F5;
}

.contact-form-layout .text-gray-400 { /* For "Estamos aquí para ayudarte" text */
    color: #AAAAAA; /* Slightly lighter gray for contrast */
}

.contact-form-layout .text-blue-400 { /* For accent color in title */
    color: #00BFFF; /* Bright blue accent */
}

.contact-form-layout .fa-envelope, .contact-form-layout .fa-phone-alt {
    color: #00BFFF; /* Bright blue icons */
}

.contact-form-layout a {
    color: #BBBBBB;
}

.contact-form-layout a:hover {
    color: #00BFFF;
}

.form-input {
    width: 100%; /* Ensure it takes full width of its grid cell */
    background-color: #2A2A2A; /* Input background, slightly lighter than form layout */
    color: #F5F5F5; /* Light text for input */
    padding: 1.2rem 1.4rem; /* Generous padding */
    border: none; /* Removed border */
    border-radius: 8px; /* Rounded corners for inputs */
    box-shadow: none; /* Crucial: Removed all box-shadow for flat design */
    transition: all 0.2s ease-in-out;
}

.form-input::placeholder {
    color: #999999; /* Lighter placeholder text */
}

.form-input:focus {
    background-color: #333333; /* Slightly lighter on focus */
    box-shadow: none; /* Removed box-shadow on focus */
    outline: 2px solid #00BFFF; /* Blue outline on focus for modern flat design */
    outline-offset: 1px; /* Small offset for the outline */
    border: none; /* Ensure no border on focus */
}

/* Error highlighting */
.form-input.border-red-500 {
    outline: 2px solid #EF4444; /* Red outline for error */
    outline-offset: 1px; /* Small offset for the outline */
    border: none; /* Ensure no border on error */
}

.error-message {
    color: #FF6666; /* Brighter red for errors */
}

#contact-form button[type="submit"] {
    background-color: #3597CA; /* Bright blue */
}

#contact-form button[type="submit"]:hover {
    background-color: #3597CA;
}

#contact-form button[type="submit"] .fa-arrow-right,
#contact-form button[type="submit"] .fa-spinner {
    color: #00BFFF; /* Bright blue icon inside white circle */
}

#contacto .box-1-form img {
    width: 60%;
}

/* Footer */
footer {
    background-color: #111111; /* Even darker footer */
    color: #BBBBBB;
}

#footer-byp {
    padding: 100px 0;
}

footer a {
    color: #BBBBBB;
}

footer a:hover {
    color: #00BFFF; /* Bright blue on hover */
}

.footer-col h4 {
    color: #00BFFF; /* Bright blue for footer headings */
}

.footer-col h4::after {
    background-color: #00BFFF; /* Bright blue underline */
}

/* Bottom Footer */
.bg-gray-950 {
    background-color: #0A0A0A; /* Deepest dark for bottom footer */
    color: #999999;
}

.bg-gray-950 .text-fuchsia-500 { /* This class is still in HTML, needs to be mapped to new color */
    color: #00BFFF; /* Bright blue for Digitan link */
}

.bg-gray-950 .text-fuchsia-500:hover {
    color: #009ACD;
}

footer img {
    width: 70%;
    margin-bottom: 30px;
}

footer .text-history-footer {
    text-align: justify;
    padding-right: 50px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .top-header .flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        display: none;
    }

    .top-header h1 {
        text-align: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .header .main-nav {
        display: none; /* Hide nav on small screens, can implement a hamburger menu later */
    }

    .header {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .header .logo {
        width: 100%;
        margin-bottom: 1rem;
    }

    .header .btn-primary {
        width: 100%;
        text-align: center;
    }

    #inicio .text-4xl {
        font-size: 2.5rem;
    }

    #inicio .text-xl {
        font-size: 1.25rem;
    }

    #productos .grid {
        grid-template-columns: 1fr;
    }

    #catalogo h2 { /* Updated ID from #nfc to #catalogo */
        font-size: 3rem;
    }

    #chile-number-one h2 {
        font-size: 2.5rem;
    }

    footer .grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col ul, .footer-col div {
        align-items: center;
        justify-content: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Contact Form Responsive Adjustments */
    .contact-form-layout {
        padding: 1.5rem; /* Adjust padding for smaller screens */
    }

    .contact-form-layout .flex-col.justify-between {
        padding-right: 0;
        margin-bottom: 2rem; /* Add space between text and form */
    }
}
