/**
 * Main Styles
 * Estilos principales del tema ContentOClock Base
 * 
 * @package ContentOClock_Base
 * @version 1.0.0
 */

/* ==========================================
   RESET Y BASE
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #F5F1E8;
    overflow-x: hidden;
}

/* Tailwind utility classes - Fallback */
.text-primary {
    color: #4CAF50 !important;
}

.text-accent {
    color: #FF9800 !important;
}

.bg-primary {
    background-color: #4CAF50 !important;
}

.bg-accent {
    background-color: #FF9800 !important;
}

/* ==========================================
   NAVEGACIÓN
   ========================================== */

.nav-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

/* ==========================================
   LOGO - HEADER
   ========================================== */

/* Selector específico para el logo en navbar */
nav .logo-link {
    display: flex;
    align-items: center;
    min-height: 60px;
}

nav .site-logo,
.nav-glass .site-logo,
nav .custom-logo,
.nav-glass .custom-logo {
    height: 3rem !important; /* 48px en móvil - !important necesario para Tailwind */
    width: auto;
    max-width: 100%;
    display: block;
}

/* Tablet */
@media (min-width: 768px) {
    nav .site-logo,
    .nav-glass .site-logo,
    nav .custom-logo,
    .nav-glass .custom-logo {
        height: 3.5rem !important; /* 56px */
    }
}

/* Desktop */
@media (min-width: 1024px) {
    nav .site-logo,
    .nav-glass .site-logo,
    nav .custom-logo,
    .nav-glass .custom-logo {
        height: 4rem !important; /* 64px */
    }
}

/* ==========================================
   LOGO - FOOTER
   ========================================== */

footer .footer-logo-container,
.footer-logo-container {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
    padding: 1rem !important;
    border-radius: 1rem !important;
    width: fit-content !important;
    backdrop-filter: blur(10px) !important;
    min-height: 80px !important;
}

footer .footer-logo,
.footer-logo {
    height: 5rem !important;
    width: auto !important;
    max-width: 100% !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ==========================================
   BOTONES
   ========================================== */

.btn-primary {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 152, 0, 0.5);
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049 0%, #388E3C 100%);
}

/* ==========================================
   CARDS
   ========================================== */

.card-service {
    background: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
}

.card-service:hover {
    transform: translateY(-8px);
    border-color: #4CAF50;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: white;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.project-card img {
    transition: transform 0.6s ease;
}

.project-card:hover img {
    transform: scale(1.08);
}

/* ==========================================
   CAROUSEL DE LOGOS
   ========================================== */

.logo-carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.logo-carousel {
    display: flex;
    width: fit-content;
    animation: scroll-left 30s linear infinite;
}

.logo-carousel:hover {
    animation-play-state: paused;
}

.logo-slide {
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 0 40px;
}

.logo-item {
    font-weight: 900;
    font-size: 1.75rem;
    color: #999;
    white-space: nowrap;
    transition: all 0.4s ease;
    cursor: pointer;
    filter: grayscale(100%);
}

.logo-item:hover {
    color: #4CAF50;
    filter: grayscale(0%);
    transform: scale(1.1);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.logo-carousel-container:hover .logo-carousel {
    animation-play-state: paused;
}

/* ==========================================
   ECOSISTEMA GRID
   ========================================== */

.ecosystem-grid-container {
    max-width: 900px;
    margin: 0 auto;
}

.ecosystem-center-grid {
    width: 220px;
    height: 220px;
    margin: 0 auto 40px;
    border-radius: 24px;
    background: white;
    border: 4px solid #FF9800;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(255, 152, 0, 0.3);
    animation: pulse-center 3s ease-in-out infinite;
}

@keyframes pulse-center {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 20px 60px rgba(255, 152, 0, 0.3); 
    }
    50% { 
        transform: scale(1.03); 
        box-shadow: 0 25px 70px rgba(255, 152, 0, 0.4); 
    }
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.ecosystem-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 2px solid transparent;
}

.ecosystem-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border-color: #4CAF50;
}

/* ==========================================
   SECCIÓN TAG
   ========================================== */

.section-tag {
    display: inline-block;
    color: #FF9800;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* ==========================================
   LAZY LOADING
   ========================================== */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */

@media (max-width: 1024px) {
    .ecosystem-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */

@media (max-width: 768px) {
    h1 { 
        font-size: 2.5rem !important; 
        line-height: 1.2 !important;
    }

    .logo-slide {
        gap: 40px;
        padding: 0 20px;
    }

    .logo-item {
        font-size: 1.25rem;
    }

    .logo-carousel {
        animation-duration: 20s;
    }

    .ecosystem-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 20px;
    }

    .ecosystem-card {
        padding: 20px 16px;
    }

    .ecosystem-center-grid {
        width: 180px;
        height: 180px;
        margin-bottom: 30px;
    }

    .nav-glass {
        padding: 12px 20px;
    }

    .project-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    h1 { 
        font-size: 2rem !important; 
    }

    .text-xl, .text-2xl {
        font-size: 1.1rem !important;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .card-service {
        padding: 24px;
    }

    .ecosystem-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ecosystem-center-grid {
        width: 160px;
        height: 160px;
    }

    .ecosystem-card {
        padding: 24px;
    }
}

/* ==========================================
   UTILIDADES
   ========================================== */

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Smooth scroll */
html.scroll-smooth {
    scroll-behavior: smooth;
}

/* Focus visible para accesibilidad */
*:focus-visible {
    outline: 2px solid #FF9800;
    outline-offset: 2px;
}