/* ========================================
   PROJECT PAGES COMPLETE STYLES
   All styles extracted from inline CSS in project pages
   Note: design-system.css and navbar.css are loaded separately in HTML
======================================== */

/* ========================================
   PROJECT-SPECIFIC UTILITY CLASSES
   Note: Base utilities are in common.css
======================================== */

/* Project pages override for section-title */
.section-title {
    position: relative;
    padding-bottom: var(--spacing-md);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}


/* ========================================
   HERO SECTION (SIMPLIFIED FOR PROJECT PAGES)
======================================== */
.hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0e2e 25%, #2d1b3d 50%, #1a0e2e 75%, #0a0a0a 100%);
    margin-top: 70px; /* Account for fixed navbar */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(147, 51, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(107, 70, 193, 0.2) 0%, transparent 50%);
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
}

.hero__logo {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    animation: heroFloat 4s ease-in-out infinite, glow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 30px rgba(147, 51, 234, 0.5);
    position: relative;
}

.hero__logo::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: -1;
    filter: blur(10px);
}

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

@keyframes glow {
    from { text-shadow: 0 0 30px rgba(147, 51, 234, 0.3); }
    to { text-shadow: 0 0 40px rgba(236, 72, 153, 0.5), 0 0 60px rgba(147, 51, 234, 0.3); }
}


/* ========================================
   PROJECT CONTENT STYLES
======================================== */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Game Description Section */
.game-description {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.1) 0%, rgba(147, 51, 234, 0.05) 100%);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.game-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.game-description__content {
    position: relative;
    z-index: 1;
}

.game-description__content p {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.game-description__content p:last-child {
    margin-bottom: 0;
}

.section__content {
    color: #fff;
    font-size: var(--font-size-lg);
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

.feature-card {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.12) 0%, rgba(147, 51, 234, 0.08) 100%);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 25px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    backdrop-filter: blur(20px);
    will-change: transform;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(147, 51, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, transparent 0%, rgba(147, 51, 234, 0.3) 50%, rgba(236, 72, 153, 0.3) 100%);
    border-radius: 25px;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: -1;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    border-radius: 25px;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02) rotateX(2deg);
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 15px 30px rgba(147, 51, 234, 0.3),
        0 10px 20px rgba(236, 72, 153, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.feature-card:focus {
    outline: 3px solid #ec4899;
    outline-offset: 3px;
}

.feature-card:active {
    transform: translate3d(0, -4px, 0) scale(1.01);
}

.feature-card > * {
    position: relative;
    z-index: 2;
}

.feature-card__icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.feature-card:hover .feature-card__icon {
    transform: scale(1.15) rotateZ(5deg) translateY(-5px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.feature-card__title {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.3;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #e2d5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-card__title {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card__description {
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-card__description {
    transform: translateY(-1px);
    color: rgba(255, 255, 255, 0.95);
}

/* Tech Stack Section */
.tech-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tech-card {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.1) 0%, rgba(147, 51, 234, 0.05) 100%);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 15px 30px rgba(147, 51, 234, 0.25);
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-card__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.tech-card__number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ec4899, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.tech-card__label {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 300;
}

/* Tech Stack Items */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.tech-item {
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(147, 51, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(147, 51, 234, 0.3);
}

/* Product Grid - Homepage Style */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.product-card {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.12) 0%, rgba(147, 51, 234, 0.08) 100%);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 25px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    backdrop-filter: blur(20px);
    will-change: transform;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(147, 51, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.product-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, transparent 0%, rgba(147, 51, 234, 0.3) 50%, rgba(236, 72, 153, 0.3) 100%);
    border-radius: 25px;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: -1;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    border-radius: 25px;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover::after {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02) rotateX(2deg);
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 15px 30px rgba(147, 51, 234, 0.3),
        0 10px 20px rgba(236, 72, 153, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.product-card:focus {
    outline: 3px solid #ec4899;
    outline-offset: 3px;
}

.product-card:active {
    transform: translate3d(0, -4px, 0) scale(1.01);
}

.product-card > * {
    position: relative;
    z-index: 2;
}

.product-card__image {
    width: 100%;
    height: 380px;
    object-fit: contain;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem;
    position: relative;
    z-index: 2;
}

.product-card__title {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.3;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #e2d5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.product-card:hover .product-card__title {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-card__description {
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.product-card:hover .product-card__description {
    transform: translateY(-1px);
    color: rgba(255, 255, 255, 0.95);
}

/* Rules Section - Enhanced */
.rules-section {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(147, 51, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.rules-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.05) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.rules-section__content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.rules-section__content p {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 300;
    text-align: left;
}

.rules-section__content p:last-of-type {
    margin-bottom: 2.5rem;
}

.rules-section__content .download-btn {
    display: inline-block;
    margin: 0 auto;
}

/* Download Section */
.download-section {
    background: linear-gradient(135deg, 
        rgba(107, 70, 193, 0.15) 0%, 
        rgba(147, 51, 234, 0.1) 25%, 
        rgba(236, 72, 153, 0.05) 75%, 
        rgba(107, 70, 193, 0.15) 100%);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 25px;
    padding: 2.5rem 3rem;
    margin: 3rem auto 0;
    max-width: 1000px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.download-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.2) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

.download-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.download-section__content {
    position: relative;
    z-index: 1;
}

.download-section__image {
    max-width: 500px;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    margin: 0 auto 1rem;
    display: block;
    background: transparent;
    padding: 0;
    filter: drop-shadow(0 10px 30px rgba(147, 51, 234, 0.3));
    animation: heroFloat 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.download-section__description {
    color: #ffffff;
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #9333ea, #ec4899);
    color: white;
    text-decoration: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(147, 51, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.download-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(147, 51, 234, 0.4);
}

.download-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Download Notes */
.download-note {
    background: rgba(107, 70, 193, 0.1);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

.download-note--in-development {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.download-note--ready {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.download-note strong {
    font-weight: 600;
}

/* Disabled Download Button */
.download-btn--disabled {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.download-btn--disabled:hover {
    transform: none;
    box-shadow: 0 10px 25px rgba(75, 85, 99, 0.2);
}

/* Copyright Disclaimer */
.copyright-disclaimer {
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem auto 0;
    max-width: 800px;
    text-align: left;
}

.copyright-disclaimer__title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copyright-disclaimer__text {
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

/* ========================================
   PAGE-SPECIFIC STYLES
======================================== */

/* Tentacoli Scattanti specific styles */
.tentacoli-scattanti .download-section__image {
    max-width: 280px !important;
    margin: 2rem auto 2.5rem !important;
}

.tentacoli-scattanti .product-card:nth-child(2) .product-card__image {
    height: 380px;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.3) translateY(-10px);
    padding: 0;
}

/* Meduse in Spiaggia specific styles */
.meduse-in-spiaggia .download-section__image {
    max-width: 450px !important;
    margin: 3rem auto 3.5rem !important;
}

.tentacoli-scattanti .rules-section__content ul {
    text-align: left !important;
}

/* Mobile optimization for Carte Numeriche section */
@media (max-width: 768px) {
    .tentacoli-scattanti .product-card:nth-child(2) .product-card__image {
        height: 280px;
        transform: scale(1) translateY(0);
        object-fit: contain;
        object-position: center center;
    }

    .meduse-in-spiaggia .download-section__image {
        max-width: 280px !important;
        margin: 2rem auto 2rem !important;
    }
}

/* ========================================
   MOBILE RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
        margin-top: 70px;
        min-height: 40vh;
    }
    
    .hero__content {
        padding: 0 1rem;
    }
    
    .hero__logo {
        font-size: clamp(2.5rem, 8vw, 4rem);
        margin-bottom: 1rem;
    }
    
    .section {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .tech-stack {
        justify-content: center;
        gap: var(--spacing-md);
    }

    .download-section {
        padding: var(--spacing-lg);
    }

    .download-section__image {
        max-width: 380px;
        height: auto;
    }
    
    .product-card__image {
        height: 320px;
    }
    
    .copyright-disclaimer {
        padding: 1rem;
        margin: 1.5rem 1rem 0;
        font-size: 0.85rem;
    }
    
}