/* ChiapettaDev Theme - Main CSS v1.6.2
   Animações e estilos adicionais com navbar responsiva para smartphones
   =============================================== */

/* Animações globais */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Classes de animação */
.animate-fade-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease forwards;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Efeitos hover avançados */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(43, 220, 181, 0.2);
}

/* Gradientes customizados */
.gradient-text {
    background: linear-gradient(135deg, #2bdcb5, #9b2dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    border: 2px solid transparent;
    background: linear-gradient(#0d0d0d, #0d0d0d) padding-box,
                linear-gradient(135deg, #2bdcb5, #9b2dff) border-box;
}

/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #2a2a2a;
    border-top: 4px solid #2bdcb5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Botões customizados */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #2bdcb5, #9b2dff);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: pointer;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Parallax effects */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Glassmorphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Neon effects */
.neon-text {
    text-shadow: 0 0 5px #2bdcb5,
                 0 0 10px #2bdcb5,
                 0 0 15px #2bdcb5,
                 0 0 20px #2bdcb5;
}

.neon-border {
    box-shadow: 0 0 5px #2bdcb5,
                0 0 10px #2bdcb5,
                0 0 15px #2bdcb5;
}

/* MENU MOBILE OVERLAY APRIMORADO PARA SMARTPHONES */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    backdrop-filter: blur(2px);
}

/* Efeitos para navbar ativa */
.nav-menu a.active {
    position: relative;
}

.nav-menu a.active::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: #2bdcb5;
    border-radius: 1px;
}

/* MOBILE TOUCH IMPROVEMENTS */
@media (pointer: coarse) {
    .nav-menu a {
        min-height: 44px;
        padding: 1rem;
    }

    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .hero__social a,
    .footer-social a {
        min-width: 44px;
        min-height: 44px;
    }
}

/* SMARTPHONE SPECIFIC STYLES */
@media (max-width: 768px) {
    /* Touch feedback */
    .nav-menu a.touched {
        background: rgba(43, 220, 181, 0.2);
        transform: translateY(-1px);
    }

    /* Improved mobile buttons */
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile project cards */
    .project-card {
        margin-bottom: 1rem;
    }

    .project-info {
        padding: 1.5rem;
    }

    /* Mobile skill cards */
    .skill-card {
        padding: 1.2rem 1rem;
    }

    /* Mobile typography */
    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
}

/* EXTRA SMALL SMARTPHONES */
@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0 0.5rem;
    }

    .hero__buttons {
        gap: 0.8rem;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .project-info {
        padding: 1rem;
    }

    .skill-card {
        padding: 1rem 0.8rem;
    }
}

/* LANDSCAPE SMARTPHONES */
@media (max-height: 500px) and (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding: 1rem;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
        margin-bottom: 0.5rem;
    }

    .hero h2 {
        font-size: clamp(1rem, 3vw, 1.3rem);
        margin-bottom: 1rem;
    }

    .hero__buttons {
        margin-bottom: 1.5rem;
    }

    .hero__social {
        gap: 0.5rem;
    }

    .hero__social a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Notificações responsivas */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(13, 13, 13, 0.95);
    border: 1px solid #2bdcb5;
    border-radius: 6px;
    color: #fff;
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-color: #00d4aa;
}

.notification-error {
    border-color: #ff4757;
}

.notification-warning {
    border-color: #ffa502;
}

.notification-info {
    border-color: #2bdcb5;
}

.notification-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #fff;
}

/* Back to top button responsivo */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #2bdcb5;
    color: #0d0d0d;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #9b2dff;
    transform: translateY(-3px);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }

    .notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .notification {
        min-width: auto;
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 16px;
        bottom: 15px;
        right: 15px;
    }
}

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

/* Light mode (opcional) */
.light-mode {
    --bg-dark: #ffffff;
    --bg-mid: #f8f9fa;
    --bg-light: #e9ecef;
    --text-main: #212529;
    --text-muted: #6c757d;
}

.light-mode .skill-card,
.light-mode .project-card,
.light-mode .post-card {
    background: #ffffff;
    border-color: #dee2e6;
}

/* Print styles */
@media print {
    .no-print { display: none !important; }

    body {
        background: white !important;
        color: black !important;
        padding-top: 0 !important;
    }

    a {
        color: blue !important;
        text-decoration: underline !important;
    }

    .site-header,
    .notifications-container,
    .back-to-top {
        display: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #00ff88;
        --secondary: #ff00ff;
        --bg-dark: #000000;
        --bg-mid: #111111;
        --bg-light: #222222;
        --text-main: #ffffff;
        --text-muted: #cccccc;
    }
}

/* Reduced motion para smartphones */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .mobile-menu-toggle,
    .nav-menu a {
        transition: none !important;
    }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    .nav-menu ul {
        background: rgba(0, 0, 0, 0.98);
    }

    .notification {
        background: rgba(0, 0, 0, 0.95);
    }
}

/* HIGH DPI SCREENS (RETINA) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hamburger-line {
        height: 2px;
    }

    .nav-menu a::after {
        height: 1px;
    }
}

/* iOS SAFARI SPECIFIC FIXES */
@supports (-webkit-appearance: none) {
    .nav-menu ul {
        -webkit-overflow-scrolling: touch;
    }

    body.menu-open {
        position: fixed;
        overflow: hidden;
    }
}

/* ACCESSIBILITY IMPROVEMENTS FOR MOBILE */
@media (max-width: 768px) {
    .nav-menu a:focus {
        outline: 2px solid #2bdcb5;
        outline-offset: 2px;
        background: rgba(43, 220, 181, 0.2);
    }

    .mobile-menu-toggle:focus {
        outline: 2px solid #2bdcb5;
        outline-offset: 2px;
        background: rgba(43, 220, 181, 0.1);
    }

    /* Skip to main content for screen readers */
    .skip-link:focus {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 100000;
        padding: 1rem;
        background: #2bdcb5;
        color: #0d0d0d;
        text-decoration: none;
        border-radius: 4px;
    }
}