/* =====================================================
   Minecraft Java Server Page Styles
   Page-specific layout styles - uses shared card component
   ===================================================== */

/* =====================================================
   Color Overrides - Green Theme
   ===================================================== */

.page-minecraft {
    --primary-color: #166534;
    --primary-color-rgb: 22, 101, 52;
    --primary-color: #22c55e;
    --primary-color-rgb: 34, 197, 94;
}

/* =====================================================
   Section Spacing
   ===================================================== */

.page-minecraft-java section {
    padding-top: 90px;
    padding-bottom: 90px;
}

.page-minecraft-java section:first-of-type {
    padding-top: 120px;
}

/* =====================================================
   Hero Background Image
   ===================================================== */

.hero-section {
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/products/minecraft/banner.webp');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.12;
    z-index: 0;
    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        rgba(0, 0, 0, 0.85) 25%,
        rgba(0, 0, 0, 0.5) 45%,
        rgba(0, 0, 0, 0.2) 60%,
        transparent 75%
    );
    mask-image: linear-gradient(
        to bottom,
        black 0%,
        rgba(0, 0, 0, 0.85) 25%,
        rgba(0, 0, 0, 0.5) 45%,
        rgba(0, 0, 0, 0.2) 60%,
        transparent 75%
    );
}

/* =====================================================
   Auto-generated Orbs - ensure they appear above hero background
   ===================================================== */

.page-minecraft .orbs-background {
    z-index: 2;
}

/* =====================================================
   Hero Section
   ===================================================== */

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-xl);
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1 1 50%;
    min-width: 0;
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: clamp(2rem, 4.5vw, 4rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-phrase {
    white-space: nowrap;
    display: inline-block;
    padding-bottom: 0.15em;
}

.hero-content p {
    max-width: 560px;
}

.hero-images {
    flex: 1 1 40%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Float wrapper - handles the floating animation */
.minecraft-hero-float {
    width: 100%;
    max-width: 400px;
}

/* Pause float animation when hovering the card */
.minecraft-hero-float:hover {
    animation-play-state: paused;
}

/* Hero card wrapper - handles hover transform */
.minecraft-hero-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    transform: perspective(800px) rotateY(0deg) rotateX(0deg);
    transition: transform 0.4s ease-out;
}

/* Smooth hover effect - lifts and straightens the card */
.minecraft-hero-card:hover {
    transform: perspective(800px) rotateY(0deg) rotateX(0deg) translateY(-8px) scale(1.02);
}

/* Minecraft Hero Image */
.minecraft-hero-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 15px 30px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2);
}

.minecraft-hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.25) 20%,
        rgba(255, 255, 255, 0.08) 40%,
        transparent 50%,
        transparent 80%,
        rgba(0, 0, 0, 0.25) 100%
    );
    -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;
    pointer-events: none;
    z-index: 2;
}

.minecraft-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =====================================================
   Why Us Grid Layout
   ===================================================== */

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
}

/* =====================================================
   Server Types Section
   ===================================================== */

.server-types-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-md);
}

.server-type-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.server-type-card__header {
    margin-bottom: 16px;
}

.server-type-card__header h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.server-type-card__subtitle {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: 0.02em;
}

.server-type-card__desc {
    font-size: 0.9375rem;
    color: var(--text-body);
    line-height: 1.6;
    margin: 0 0 auto 0;
    padding-bottom: 20px;
}

.server-type-card__features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-xs);
    margin-top: auto;
}

.server-type-feature {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.server-type-card:hover .server-type-feature {
    background: rgba(var(--primary-color-rgb), 0.15);
    border-color: rgba(var(--primary-color-rgb), 0.3);
}

/* =====================================================
   Hardware Section
   ===================================================== */

.hardware-tiers {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

/* =====================================================
   Panel Features Grid Layout
   ===================================================== */

.panel-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-md);
}

.panel-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 32px;
}

/* =====================================================
   FAQ Section
   ===================================================== */

.faq-intro-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.faq-intro-wrapper .tag--label {
    align-self: flex-start;
}

.faq-intro-wrapper .faq-intro-card {
    flex: 1;
    justify-content: space-between;
}

.faq-intro-card__buttons {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
}

.faq-intro-card__buttons .btn {
    flex: 1;
    min-width: 120px;
}

/* =====================================================
   Payment Section
   ===================================================== */

.payment-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: var(--gap-md);
}

.payment-methods-card {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: var(--gap-sm);
    width: 100%;
    height: 100%;
}

.payment-feature-card {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.payment-feature-card .icon-box {
    width: 48px;
    height: 48px;
    margin: 0;
}

.payment-feature-card .icon-box svg {
    width: 24px;
    height: 24px;
}

.payment-feature-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-heading);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.payment-feature-card p {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.65;
    margin: 0;
}

/* =====================================================
   CTA Section
   ===================================================== */

.cta-section {
    padding-top: 60px;
    padding-bottom: 120px;
}

/* Override glass-card for CTA - wide banner */
.cta-card.glass-card {
    display: block;
    border-radius: 20px;
    max-width: 100%;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-card.glass-card:hover {
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(var(--primary-color-rgb), 0.2);
}

/* Arrow indicator */
.cta-card__arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cta-card__arrow svg {
    width: 18px;
    height: 18px;
    color: white;
    transition: transform 0.3s ease;
}

.cta-card.glass-card:hover .cta-card__arrow {
    background: rgba(var(--primary-color-rgb), 0.3);
    border-color: var(--primary-color);
}

.cta-card.glass-card:hover .cta-card__arrow svg {
    transform: translateX(3px);
}

/* Keep overlay at bottom like normal glass-cards */
.cta-card .glass-card__overlay {
    left: 20px;
    right: 20px;
    bottom: 20px;
    top: auto;
    padding: 24px 32px;
    border-radius: 16px;
}

/* Stronger glass border for large cards */
.cta-card.glass-card::before {
    padding: 2px;
    border-radius: 20px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.25) 20%,
        rgba(255, 255, 255, 0.08) 40%,
        transparent 50%,
        transparent 80%,
        rgba(0, 0, 0, 0.25) 100%
    );
}

/* Glass effect always visible - stronger for large banner */
.cta-card .glass-card__overlay::before {
    opacity: 1;
    backdrop-filter: blur(32px) saturate(1.8) brightness(1.1);
    -webkit-backdrop-filter: blur(32px) saturate(1.8) brightness(1.1);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

.cta-card .glass-card__overlay::after {
    opacity: 1;
    background: rgba(0, 0, 0, 0.35);
}

/* Grain effect on image */
.cta-card .glass-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    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.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.08;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* CTA content always visible */
.cta-card__title,
.cta-card__subtitle,
.cta-card .btn {
    opacity: 1;
    transform: translateY(0);
}

.cta-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cta-card__subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1rem 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* =====================================================
   Responsive Styles
   ===================================================== */

@media (max-width: 1200px) {
    .minecraft-hero-float {
        max-width: 350px;
    }

    .server-types-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-methods-card {
        grid-column: span 2;
        grid-row: span 1;
    }

    .payment-methods-grid {
        grid-template-rows: auto;
    }
}

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

    .panel-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        gap: var(--gap-xl);
    }

    .hero-content {
        text-align: center;
        padding-right: 0;
    }

    .hero-content h1 {
        margin: 0 auto;
    }

    .hero-images {
        width: 100%;
        justify-content: center;
    }

    .minecraft-hero-float {
        max-width: 300px;
        animation: float 6s ease-in-out infinite; /* Use simpler float on mobile */
    }

    .why-us-grid {
        margin-top: 32px;
    }
}

@media (max-width: 768px) {
    .minecraft-hero-float {
        max-width: 260px;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
    }

    .server-types-row {
        grid-template-columns: 1fr;
        gap: var(--gap-md);
    }

    .panel-features-grid {
        grid-template-columns: 1fr;
    }

    .hardware-tiers {
        gap: var(--gap-sm);
    }

    .payment-bento-grid {
        grid-template-columns: 1fr;
    }

    .payment-methods-card {
        grid-column: span 1;
        grid-row: span 1;
    }

    .payment-methods-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: var(--gap-sm);
    }

    .cta-card.glass-card {
        aspect-ratio: 2 / 1;
    }

    .cta-card .glass-card__overlay {
        padding: 30px 20px;
    }

    .faq-intro-card__buttons {
        flex-direction: column;
    }

    .faq-intro-card__buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .payment-methods-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}
