/* ==========================================================
 * PREMUM UI - WEB DEVELOP V3 
 * ========================================================== */

@font-face {
    font-family: 'Geometria-ExtraBold';
    src: url('../fonts/Geometria-ExtraBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Geometria-Light';
    src: url('../fonts/Geometria-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Geometria';
    src: url('../fonts/Geometria.woff2') format('woff2');
}

:root {
    --primary-gradient: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    --bg-light: #f8f9fa;
    --text-color: #2b3035;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

body {
    font-family: 'Geometria', sans-serif;
    color: #E2E8F0; /* Soft white SaaS text */
    background-color: #08090C !important; /* Deep dark background */
    cursor: auto /* Using native cursor for better UX unless custom is explicitly desired */;
    overflow-x: hidden; /* Evita scrolls horizontales si componentes se desbordan */
}

/* Base grid safeguards for components missing them */
section, .home-bloque-principal, .wrapper {
    position: relative;
    max-width: 100%; /* No longer 100vw, now strictly contained by parent wrapper */
    z-index: 1; /* Creates stacking context keeping z-index: -1 videos visible */
}

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

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Geometria-ExtraBold', sans-serif;
    color: #F8FAFC !important;
    letter-spacing: -0.5px;
}

/* Neutralize the specific .h2tabs styling that was forcing dark colors/gradients */
.h2tabs, .h2tabs-page-50 {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: #F8FAFC !important;
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    filter: none !important;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* ==========================================================
 * MAC CAPSULE NAVBAR (DARK GLASSMORPHISM)
 * ========================================================== */

.navbar-premium {
    background: rgba(33, 37, 41, 0.8) !important; /* Dark footer tone */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08); /* subtle light border */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); /* stronger shadow for contrast */
    padding: 0.5rem 1rem;
    border-radius: 50px; /* MAC CAPSULE SHAPE */
    transition: all 0.3s ease;
    width: 100%;
    max-width: 900px;
}

.navbar-premium .nav-link {
    font-family: 'Geometria-ExtraBold', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1.2rem;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.navbar-premium .nav-link:hover,
.navbar-premium .nav-link:focus,
.navbar-premium .nav-link.active {
    color: #FF8C00 !important;
    transform: translateY(-2px);
}

.navbar-premium .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.4);
}

.navbar-premium .nav-link:hover::after,
.navbar-premium .nav-link.active::after {
    width: 70%;
}

.navbar-premium .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,140,0,0.1);
    animation: fadeInDown 0.3s ease forwards;
}

.navbar-premium .dropdown-item {
    font-family: 'Geometria', sans-serif;
    font-weight: 500;
    color: #555;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.navbar-premium .dropdown-item:hover {
    background: linear-gradient(to right, rgba(255,140,0,0.05), rgba(255,140,0,0.1));
    color: #FF8C00;
    padding-left: 1.8rem; /* slight slide in */
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 140, 0, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Text Shadow util */
.text-shadow {
    text-shadow: 0px 2px 4px rgba(255,140,0,0.2);
}

/* ==========================================================
 * MAIN CONTENT BOXED LAYOUT (MINIMALIST PORTFOLIO)
 * ========================================================== */

#theme-main {
    max-width: 1200px;
    margin: 0 auto;
    background-color: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-bottom: 2rem;
    min-height: calc(100vh - 150px);
}

/* Ensure the hero video has a minimalist constraint naturally by inheriting #theme-main */
.home-bloque-principal {
    border-radius: 40px !important;
    overflow: hidden;
    position: relative;
    max-width: 1100px; /* More compact interior */
    height: 65vh !important; /* Shorten height for new narrower width to fix aspect ratio */
    min-height: 500px;
    max-height: 800px;
    margin: 2rem auto !important;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Subtle SaaS border */
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5); /* Deep grounding shadow */
}

/* Lighten overlays for Dark SaaS Theme to reveal background video and text */
.overlay-bg, .overlay-bg2 {
    background: linear-gradient(to bottom, rgba(8, 9, 12, 0.1) 0%, rgba(8, 9, 12, 0.6) 100%) !important;
    z-index: 1 !important;
}

.blur-background {
    position: relative;
    padding: 45px !important;
    border-radius: 32px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

.blur-background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    z-index: -1;
    /* Fades the blur and BG at the bottom so it doesn't obscure the background text */
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.caja-sobre-video {
    z-index: 5 !important;
}

/* Typography Normalization for 1200px Minimalism */
h1.glitch, .glitch {
    font-size: clamp(2rem, 3.5vw, 3rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem;
}

.titulo-h2-homemain, h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.25rem) !important;
}

/* Standard paragraph in boxes (avoid infinite lines) */
p {
    font-size: 1rem;
    max-width: 800px;
}

/* Force auto-centering and strip left margins from old sidebar layout */
.content-wrapper,
.wrapper,
.home-bloque-principal,
form,
.caja-sobre-video {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Overriding old picostrap offset classes if they exist */
#page-content-wrapper, 
body {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

#theme-main {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 1200px) {
    #theme-main {
        border-radius: 0; 
        box-shadow: none;
        margin: 0 auto;
    }
    .home-bloque-principal {
        border-radius: 0 !important;
        margin-top: 0 !important;
        border: none;
    }
}

/* ==========================================================
 * SAAS ANIMATIONS & MESH GRADIENTS (DARK MODE)
 * ========================================================== */

/* Mesh Gradient Glowing Orbs replacing old floating squares/circles */
.circle-animation-1, .circle-animation-2, 
.elemento-giratorio-1, .elemento-giratorio-2, 
.elemento-giratorio-3, .elemento-giratorio-4 {
    border-radius: 50% !important;
    filter: blur(90px) !important;
    opacity: 0.45 !important;
    mix-blend-mode: screen;
    animation: saas-float 12s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate !important;
    border: none !important;
    box-shadow: none !important;
}

.circle-animation-1 { background: #FF8C00 !important; width: 40vw !important; height: 40vw !important; top: -10%; left: -10%; }
.circle-animation-2 { background: #7C3AED !important; width: 45vw !important; height: 45vw !important; bottom: -10%; right: -10%; }
.elemento-giratorio-1 { background: #E11D48 !important; width: 35vw !important; height: 35vw !important; top: 30%; left: 30%; }
.elemento-giratorio-2 { background: #0EA5E9 !important; width: 30vw !important; height: 30vw !important; bottom: 10%; left: 10%; }

@keyframes saas-float {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    100% { transform: translateY(-80px) scale(1.15) rotate(15deg); }
}

/* Smooth Spring Slide In for text */
.fadesobrevideo {
    position: absolute !important;
    bottom: 5% !important;
    right: 5% !important;
    top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    width: auto !important;
    z-index: 0;
}

/* Smooth Spring Slide In for text - BRIGHTENED FOR DARK MODE */
.tx-frontdev1 {
    animation: saas-slide-in-right 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    opacity: 0;
    display: block !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    text-shadow: none !important; /* REQ: Remove dark shadow */
    color: #FFFFFF !important; /* Pure white for maximum visibility */
    font-size: clamp(3rem, 10vw, 6.5rem) !important; 
    line-height: 0.8 !important;
}

.tx-frontdev2 {
    animation: saas-slide-in-left 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    animation-delay: 0.15s !important;
    opacity: 0;
    display: block !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    text-shadow: none !important; /* REQ: Remove dark shadow */
    color: #FFFFFF !important; /* Pure white for maximum visibility */
    font-size: clamp(3rem, 10vw, 6.5rem) !important; 
    line-height: 0.8 !important;
}

/* Neutralize the too-transparent legacy gray gradient */
.animated-text-gris {
    -webkit-text-fill-color: initial !important; 
    -webkit-background-clip: initial !important;
    background-clip: initial !important; /* Lint fix */
    background-image: none !important;
    color: rgba(255, 255, 255, 0.3) !important; /* Subtle but visible floating text */
}

/* On hover or specialized states, keep them readable */
.tx-frontdev1:hover, .tx-frontdev2:hover {
    color: #FF8C00 !important;
    opacity: 0.8 !important;
}

@keyframes saas-slide-in-right {
    0% { transform: translateX(120px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes saas-slide-in-left {
    0% { transform: translateX(-120px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

/* Dark SaaS Component Cards */
.cajas-habilidades, .widget, .card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px !important;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease;
    overflow: hidden;
}
.cajas-habilidades:hover, .widget:hover, .card:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateY(-5px);
}
.cajas-habilidades h3, .card h3 {
    color: #F1F5F9 !important;
    position: relative;
    z-index: 10;
}
.cajas-habilidades img {
    position: relative;
    z-index: 10;
}
/* Override old flashing white spinning box to a soft glowing aura */
.cajas-habilidades:hover::after {
    background: radial-gradient(circle, rgba(255,140,0,0.4) 0%, rgba(255,140,0,0) 70%) !important;
    filter: blur(20px) !important;
    z-index: 0 !important;
    opacity: 0.8 !important;
}

#theme-main {
    flex-grow: 1;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 4rem;
}

/* ==========================================================
 * FLOATING SQUARES & DECORATIONS (Migrated from custom.scss)
 * ========================================================== */
span.texto-bg-naranja {
    background-image: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.o-pintada {
    display: inline-block;
    position: relative;
}
.o-pintada::after {
    content: "";
    width: 0.3em;
    height: 0.3em;
    border-radius: 50%;
    background-image: var(--primary-gradient);
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.float-cubo-1, .float-cubo-2, .float-cubo-3, .float-cubo-4, .float-cubo-5 {
    animation: flotante-cubo 6s infinite ease-in-out;
}

@keyframes flotante-cubo {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

.cuadrado-tit-5 {
    position: relative;
    top: 100px;
    z-index: -1;
}
.cuadrado-tit-5::before {
    content: "";
    position: absolute;
    top: 1%;
    z-index: 3;
    left: 53%;
    transform: translate(-50%, -50%);
    width: 100%;
    border-radius: 12px;
    height: 223px;
    background-image: var(--primary-gradient);
    box-shadow: 0 10px 20px rgba(255, 140, 0, 0.4);
}

/* ==========================================================
 * MODERN SAAS TABS REDESIGN (COMPACT)
 * ========================================================== */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Compact gap */
    background: rgba(255, 255, 255, 0.03);
    padding: 6px; /* Compact padding */
    border-radius: 50px; /* Slimmer capsule */
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: fit-content;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.tablinks {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 8px 18px !important; /* Compact button padding */
    border-radius: 50px !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 600;
    font-size: 0.85rem; /* Smaller font for compactness */
    position: relative;
}

.tablinks:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.tablinks.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #FF8C00 !important; /* Accent text instead of solid background for cleaner look */
    box-shadow: inset 0 0 0 1px rgba(255, 140, 0, 0.4);
}

.wrapper_tabcontent {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px; /* Slightly smaller radius */
    padding: 30px; /* Reduced padding for content */
    margin-top: 5px;
    backdrop-filter: blur(5px);
}

.tabcontent h3 {
    font-size: 1.5rem; /* More compact title */
    color: #FFFFFF !important;
    margin-bottom: 10px;
}

.tabcontent span {
    display: block;
    color: #FF8C00;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.75rem; /* Smaller metadata */
    letter-spacing: 1px;
}

.tabcontent p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem; /* More compact body text */
}

/* Force show elements that might be stuck with AOS opacity: 0 */
[data-aos] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

@keyframes saas-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes saas-slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Neutralize Light Shadows Globally from main.css */
[style*="rgba(143, 143, 143, 0.5)"], 
.drop-shadow-light {
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4)) !important;
}

/* ==========================================================
 * ARCHIVE POST GRID (DARK SAAS)
 * ========================================================== */
.posts-pagina {
    background: rgba(255, 255, 255, 0.03);
    margin: 15px;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2), 0 10px 15px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.posts-pagina:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 140, 0, 0.15);
    background: rgba(255, 255, 255, 0.06);
}
.posts-pagina img {
    border-radius: 16px;
    margin-bottom: 20px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.posts-pagina:hover img {
    transform: scale(1.03);
}
.posts-pagina a {
    text-decoration: none;
    color: #E2E8F0;
}
.posts-pagina h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0;
    transition: color 0.3s;
}
.posts-pagina:hover h3 {
    color: #FF8C00;
}

/* ==========================================================
 * RESPONSIVENESS
 * ========================================================== */
@media (max-width: 992px) {
    #sidebar-container {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    #sidebar-container.active {
        transform: translateX(0);
    }
    .mobile-nav-toggle {
        display: block !important;
    }
}
@media (min-width: 993px) {
    .mobile-nav-toggle {
        display: none !important;
    }
}
