/**
 * Custom CSS - Centralcomm Site
 * Design System Arrojado
 */

/* ===========================
   CRITICAL: HIDE MODALS ON LOAD
   =========================== */
#cookie-banner:not(.show),
#promo-bar:not(.show),
#audience-modal:not(.active),
#videoModal:not(.active),
.video-modal:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===========================
   ROOT VARIABLES
   =========================== */
:root {
    --primary: #4CAF50;
    --primary-light: #81C784;
    --primary-dark: #388E3C;
    --secondary: #F9A825;
    --dark: #000000;
    --navy: #0a0a0a;
}

/* ===========================
   SCROLLBAR CUSTOMIZADA
   =========================== */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===========================
   ANIMAÇÕES BASE
   =========================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

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

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

/* Animation Classes */
.animate-fadeIn { animation: fadeIn 0.6s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }
.animate-fadeInDown { animation: fadeInDown 0.6s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.6s ease forwards; }
.animate-slideInRight { animation: slideInRight 0.6s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.6s ease forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-rotate { animation: rotate 20s linear infinite; }

/* Delay classes */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* ===========================
   TEXT REVEAL ANIMATION
   =========================== */
.text-reveal {
    overflow: hidden;
}

.text-reveal-inner {
    display: block;
    transform: translateY(100%);
    animation: revealText 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes revealText {
    to { transform: translateY(0); }
}

/* ===========================
   LINE CLAMP
   =========================== */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

/* ===========================
   GRADIENTES
   =========================== */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.gradient-dark {
    background: radial-gradient(ellipse at center, #0a0a0a 0%, #000 100%);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    border-radius: inherit;
}

/* ===========================
   CARDS
   =========================== */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-hover:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-dark {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===========================
   BOTÕES
   =========================== */
.btn-primary {
    background: var(--primary);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: white;
    color: black;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: white;
    border-color: white;
    color: black;
}

.btn-glow {
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3);
}

.btn-glow:hover {
    box-shadow: 0 0 50px rgba(76, 175, 80, 0.5);
}

/* ===========================
   INPUTS
   =========================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #0a0a0a inset;
    -webkit-text-fill-color: #ffffff;
    transition: background-color 5000s ease-in-out 0s;
}

select option {
    background-color: #0a0a0a;
    color: #ffffff;
}

.input-dark {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.input-dark:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    outline: none;
}

/* ===========================
   TICKER
   =========================== */
.ticker-container {
    overflow: hidden;
    position: relative;
}

.ticker-container::before,
.ticker-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.ticker-container::before {
    left: 0;
    background: linear-gradient(to right, #000, transparent);
}

.ticker-container::after {
    right: 0;
    background: linear-gradient(to left, #000, transparent);
}

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

.ticker-track {
    display: flex;
    align-items: center;
    animation: ticker 30s linear infinite;
    width: max-content;
}

.ticker-track:hover {
    animation-play-state: paused;
}

/* ===========================
   ASPECT RATIOS
   =========================== */
.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-portrait {
    aspect-ratio: 3 / 4;
}

/* ===========================
   SKELETON LOADING
   =========================== */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===========================
   TOOLTIP
   =========================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: white;
    color: black;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===========================
   BADGE
   =========================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
}

.badge-primary {
    background: rgba(76, 175, 80, 0.2);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(249, 168, 37, 0.2);
    color: var(--secondary);
}

.badge-white {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ===========================
   IMAGE EFFECTS
   =========================== */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom:hover img {
    transform: scale(1.1);
}

.img-grayscale {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.img-grayscale:hover {
    filter: grayscale(0%);
}

/* ===========================
   CURSOR
   =========================== */
.cursor-pointer {
    cursor: pointer;
}

.cursor-none {
    cursor: none;
}

/* ===========================
   SELECTION
   =========================== */
::selection {
    background: var(--primary);
    color: white;
}

/* ===========================
   RESPONSIVE UTILITIES
   =========================== */
@media (max-width: 768px) {
    .mobile-full {
        width: 100%;
    }
    
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-center {
        text-align: center;
    }
    
    .mobile-hidden {
        display: none;
    }
}

@media (min-width: 769px) {
    .desktop-hidden {
        display: none;
    }
}

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===========================
   FOCUS STYLES
   =========================== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===========================
   SMOOTH SCROLL
   =========================== */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
