/*
Theme Name: Emagest Theme
Theme URI: https://emagest.cl
Author: Plantech
Author URI: https://plantech.cl
Description: Custom theme for Emagest, replicating the React design 1:1. Optimized for Elementor.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: emagests-theme
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

This theme requires the compiled Tailwind CSS file at assets/css/main.css.
To build: cd emagests-theme && npm install && npm run build
*/

/*
================================================================================
FALLBACK STYLES
These styles provide basic functionality if Tailwind CSS is not compiled.
Once npm run build is executed, these are superseded by assets/css/main.css.
================================================================================
*/

/* Minimal Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* EMAGEST Brand Colors */
    --navy: hsl(213, 75%, 16%);
    --navy-dark: hsl(213, 75%, 10%);
    --orange: hsl(16, 100%, 60%);
    --orange-dark: hsl(16, 100%, 50%);
    --white: #ffffff;
    --gray-light: hsl(216, 33%, 97%);
    --gray-dark: hsl(210, 24%, 24%);

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Full-Width Layout Fixes */
#page,
.site,
.site-main,
main,
article {
    width: 100%;
    max-width: 100%;
}

/* WordPress/Elementor Full-Width Overrides */
.elementor-section.elementor-section-boxed>.elementor-container {
    max-width: 100%;
}

.elementor-section.elementor-section-full_width {
    max-width: 100%;
    width: 100%;
}

/* Override boxed WP admin bar spacing */
body.admin-bar {
    margin-top: 0;
}

/* Ensure sections take full viewport width */
section {
    max-width: 100vw;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--navy);
    margin-top: 0;
    font-weight: 700;
}

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

a:hover {
    color: var(--orange-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Basic Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Basic Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    color: var(--white);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--orange), hsl(30, 100%, 55%));
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
    color: var(--white);
}

.btn-outline-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
    transition: all 0.3s;
}

.btn-outline-hero:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

/* Navbar Glass Effect */
.navbar-glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(11, 37, 69, 0.85), rgba(11, 37, 69, 0.75));
    box-shadow: 0 8px 32px rgba(11, 37, 69, 0.2);
}

/* Navigation Menu - Remove bullets and fix styling */
.desktop-menu-container,
.desktop-menu-container ul,
nav ul,
#primary-menu,
.menu,
header nav ul,
header li,
.site-header-wrapper li,
.navbar-glass li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0;
    padding: 0;
}

.desktop-menu-container li::marker,
nav li::marker,
header li::marker {
    content: none;
    display: none;
}

/* Navigation links default state */
.nav-link-header,
.nav-link-desktop {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    background: transparent !important;
}

.nav-link-header:hover,
.nav-link-desktop:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Active link - only apply when actually on that section */
.nav-link-active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    background: linear-gradient(135deg, rgba(11, 37, 69, 0.98) 0%, rgba(11, 37, 69, 0.95) 100%);
}

.mobile-menu-overlay ul,
.mobile-menu-overlay li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Gradient Text - with italic clipping fix */
.gradient-text {
    background: linear-gradient(135deg, var(--orange), hsl(30, 100%, 55%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
    padding: 0.1em 0.05em;
}

/* Hero Title - prevent italic clipping */
#inicio h1,
.hero-title,
section h1[style*="italic"] {
    overflow: visible;
    padding: 0.15em 0;
    line-height: 1.15;
}

/* WordPress Admin Bar Fix */
body.admin-bar header.fixed,
body.admin-bar .fixed {
    top: 32px;
}

@media screen and (max-width: 782px) {

    body.admin-bar header.fixed,
    body.admin-bar .fixed {
        top: 46px;
    }
}

/* Basic Utility Classes (fallback) */
.hidden {
    display: none;
}

.flex {
    display: flex;
}

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

.justify-center {
    justify-content: center;
}

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

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

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

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

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

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

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

.font-heading {
    font-family: var(--font-heading);
}

.font-bold {
    font-weight: 700;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.pt-20 {
    padding-top: 5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.overflow-hidden {
    overflow: hidden;
}

.object-cover {
    object-fit: cover;
}

.transition-all {
    transition: all 0.3s;
}

/* Grid fallbacks */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:text-6xl {
        font-size: 3.75rem;
        line-height: 1;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    .lg\:flex {
        display: flex;
    }

    .lg\:hidden {
        display: none;
    }

    .lg\:text-7xl {
        font-size: 4.5rem;
        line-height: 1;
    }
}

/* Opacity utilities */
.opacity-0 {
    opacity: 0;
}

.opacity-15 {
    opacity: 0.15;
}

.opacity-20 {
    opacity: 0.2;
}

.opacity-30 {
    opacity: 0.3;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-100 {
    opacity: 1;
}

/* Spacing - flex-col and sm: */
.flex-col {
    flex-direction: column;
}

@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}

/* Text sizes */
.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

/* White with opacity */
.text-white\/50 {
    color: rgba(255, 255, 255, 0.5);
}

.text-white\/60 {
    color: rgba(255, 255, 255, 0.6);
}

.text-white\/70 {
    color: rgba(255, 255, 255, 0.7);
}

.text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}

.bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.05);
}

.bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.1);
}

.border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.border-white\/40 {
    border-color: rgba(255, 255, 255, 0.4);
}

/* Orange with opacity */
.bg-orange\/10 {
    background-color: rgba(255, 107, 53, 0.1);
}

.bg-orange\/20 {
    background-color: rgba(255, 107, 53, 0.2);
}

/* Navy with opacity */
.bg-navy\/5 {
    background-color: rgba(11, 37, 69, 0.05);
}

.bg-navy\/60 {
    background-color: rgba(11, 37, 69, 0.6);
}

/* Gray utilities */
.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-gray-200 {
    background-color: #e5e7eb;
}

.border-gray-100 {
    border-color: #f3f4f6;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

/* Green for success states */
.bg-green-50 {
    background-color: #f0fdf4;
}

.bg-green-500 {
    background-color: #22c55e;
}

.text-green-600 {
    color: #16a34a;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Borders */
.border {
    border-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-l-4 {
    border-left-width: 4px;
}

.border-orange {
    border-color: var(--orange);
}

/* Backdrop blur */
.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Leading (line-height) */
.leading-relaxed {
    line-height: 1.625;
}

.leading-tight {
    line-height: 1.25;
}

/* Font weights */
.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-extrabold {
    font-weight: 800;
}

/* Tracking (letter-spacing) */
.tracking-wider {
    letter-spacing: 0.05em;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.uppercase {
    text-transform: uppercase;
}

/* Max widths */
.max-w-2xl {
    max-width: 42rem;
}

.max-w-5xl {
    max-width: 64rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Hover states - general */
.hover\:text-white:hover {
    color: var(--white);
}

.hover\:text-orange:hover {
    color: var(--orange);
}

.hover\:bg-white\/10:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hover\:scale-110:hover {
    transform: scale(1.1);
}

.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Flex utilities */
.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-grow {
    flex-grow: 1;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.space-y-3>*+* {
    margin-top: 0.75rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

.space-y-8>*+* {
    margin-top: 2rem;
}

/* Transitions */
.transition-colors {
    transition-property: color, background-color, border-color;
    transition-duration: 300ms;
}

.transition-transform {
    transition-property: transform;
    transition-duration: 300ms;
}

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

.duration-500 {
    transition-duration: 500ms;
}

/* Specific heights/widths */
.h-10 {
    height: 2.5rem;
}

.h-12 {
    height: 3rem;
}

.h-16 {
    height: 4rem;
}

.h-20 {
    height: 5rem;
}

.h-28 {
    height: 7rem;
}

.h-48 {
    height: 12rem;
}

.w-6 {
    width: 1.5rem;
}

.w-10 {
    width: 2.5rem;
}

.w-12 {
    width: 3rem;
}

.w-20 {
    width: 5rem;
}

.w-32 {
    width: 8rem;
}

.w-48 {
    width: 12rem;
}

.h-6 {
    height: 1.5rem;
}

/* Aspect ratios */
.aspect-\[4\/3\] {
    aspect-ratio: 4/3;
}

/* No underline */
.no-underline {
    text-decoration: none;
}

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sticky */
.sticky {
    position: sticky;
}

.top-28 {
    top: 7rem;
}

/* Prose (basic) */
.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.75;
}