/* ===================================================
   Nobregas Hosting - Dark Theme Styles
   Modern dark UI with blue brand accent
   =================================================== */

/* ---- Base & Reset ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #030712;
    color: #e5e7eb;
    overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.25); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.45); }

/* ---- Selection ---- */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

/* ---- Particle Canvas ---- */
#particle-canvas {
    opacity: 0.6;
}

/* ---- Reveal Animations ---- */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-element:nth-child(2) { transition-delay: 0.1s; }
.reveal-element:nth-child(3) { transition-delay: 0.2s; }
.reveal-element:nth-child(4) { transition-delay: 0.3s; }
.reveal-element:nth-child(5) { transition-delay: 0.4s; }
.reveal-element:nth-child(6) { transition-delay: 0.5s; }

/* ---- Pricing Card Hover Lift ---- */
.pricing-card > div:last-child {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}
.pricing-card:hover > div:last-child {
    transform: translateY(-8px);
}

/* ---- Nav Styles ---- */
#main-header.scrolled #main-nav {
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

#main-header.scrolled #main-nav > div {
    max-width: 72rem;
}

@media (min-width: 768px) {
    #main-header.scrolled #main-nav {
        margin: 0.5rem auto;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        border-radius: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
}

/* ---- Glass Cards ---- */
.glass-dark {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Gradient Text ---- */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Glow Effects ---- */
.glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3),
                0 0 60px rgba(59, 130, 246, 0.1);
}

.glow-blue-hover:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4),
                0 0 80px rgba(59, 130, 246, 0.15);
}

/* ---- Button Ripple Effect ---- */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ---- Table Row Hover ---- */
table tbody tr {
    transition: background-color 0.2s ease;
}

/* ---- Mobile Menu Animation ---- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

#mobile-menu.hidden {
    display: none;
}

/* ---- Animated Noise Texture (subtle) ---- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---- Smooth Link Transitions ---- */
a {
    transition: color 0.2s ease;
}

/* ---- Focus Visible ---- */
*:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Responsive Tweaks ---- */
@media (max-width: 640px) {
    .reveal-element {
        transform: translateY(20px);
    }
}

/* ---- Print Styles ---- */
@media print {
    body { background: #fff; color: #000; }
    #particle-canvas,
    #main-header,
    .fixed { display: none !important; }
    body::before { display: none; }
}

/* ============================================================
   Hosting Nav Dropdown
   ============================================================ */

/* The panel is positioned absolutely under the trigger button */
.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 272px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Show on parent hover or focus-within */
#hosting-nav-item:hover .nav-dropdown-panel,
#hosting-nav-item:focus-within .nav-dropdown-panel {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Rotate chevron on hover */
#hosting-nav-item:hover #hosting-chevron,
#hosting-nav-item:focus-within #hosting-chevron {
    transform: rotate(180deg);
    color: #60a5fa;
}

#hosting-chevron {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

/* Small triangle pointer at top of dropdown */
.nav-dropdown-panel::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: rgba(10, 15, 30, 0.97);
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    rotate: 45deg;
    border-radius: 2px 0 0 0;
}

/* ============================================================
   Mobile Hosting Accordion
   ============================================================ */

#mobile-hosting-items {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
}

#mobile-hosting-items.open {
    max-height: 320px;
    opacity: 1;
}

#mobile-hosting-chevron.rotated {
    transform: rotate(180deg);
    color: #60a5fa;
}
