/**
 * BirthdayCard.online - Index Page Styles
 * Optimized for performance - simplified animations
 */

/* Hero Section - Static gradient (no animation) */
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b6b 100%);
    /* Removed: background-size and animation for performance */
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    position: relative;
}

.title-highlight {
    display: block;
    color: #fff;
    font-size: 0.6em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.title-main {
    display: block;
    color: #fff;
    /* Removed: gradient text animation for performance */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Button Styles */
.hero-buttons-group {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-bottom: 45px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.hero-main-button {
    background: white;
    color: var(--primary-color);
    padding: 20px 40px;
    font-size: 1.4rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.hero-main-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: var(--primary-color);
    text-decoration: none;
}

.hero-secondary-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 20px 40px;
    font-size: 1.4rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-secondary-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.3);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-feature-item i {
    color: var(--accent-color);
    font-size: 1.3rem;
}

/* Floating Elements - Reduced count, desktop only */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: none; /* Hidden by default for performance */
}

/* Show only on large screens, reduce count */
@media (min-width: 992px) {
    .floating-elements {
        display: block;
    }
    
    .balloon {
        position: absolute;
        width: 50px;
        height: 60px;
        background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
        border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
        animation: float 6s ease-in-out infinite;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        transform: translateZ(0); /* GPU acceleration */
    }
    
    .balloon::before {
        content: '';
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 40px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 1px;
    }
    
    .sparkle {
        position: absolute;
        width: 8px;
        height: 8px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 0 10px 2px #ffeb3b;
        animation: sparkle 3s ease-in-out infinite;
        transform: translateZ(0); /* GPU acceleration */
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) translateZ(0); }
    50% { transform: translateY(-20px) translateX(10px) translateZ(0); }
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0.5) translateZ(0); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2) translateZ(0); 
    }
}

/* Section Titles */
.section-title {
    font-family: 'Pacifico', cursive;
    font-size: 2.8rem;
    color: var(--primary-color);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-icon {
    font-size: 2.2rem;
    margin: 0 15px;
    display: inline-block;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

/* Only animate on desktop, respect reduced motion */
@media (min-width: 992px) and (prefers-reduced-motion: no-preference) {
    .title-icon {
        animation: bounce 2s infinite;
    }
}

/* Enhanced Feature Cards */
.feature-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 35px 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.2rem;
    color: white;
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
}

.icon-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    filter: blur(10px);
}

/* Only animate on desktop, respect reduced motion */
@media (min-width: 992px) and (prefers-reduced-motion: no-preference) {
    .icon-glow {
        animation: pulse 2s infinite;
    }
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 20px;
}

.feature-highlight {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    opacity: 0.7;
}

/* Only animate on desktop, respect reduced motion */
@media (min-width: 992px) and (prefers-reduced-motion: no-preference) {
    .feature-highlight {
        animation: bounce 2s infinite;
    }
}

/* Enhanced Card Gallery */
.card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.card-link-wrapper:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-8px);
}

.gallery-card {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid transparent;
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.25);
    border-color: var(--primary-color);
}

.card-image-container {
    position: relative;
    overflow: hidden;
}

.gallery-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.8), rgba(78, 205, 196, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .card-overlay {
    opacity: 1;
}

.view-card-btn {
    background: white;
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-card:hover .view-card-btn {
    transform: translateY(0);
}

.gallery-card-body {
    padding: 20px;
    background: white;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.card-date {
    color: #666;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

.view-count, .created-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Enhanced How It Works Section */
.step-container {
    padding: 30px 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.step-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.step-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    font-weight: bold;
    position: relative;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
    transform: translateZ(0); /* GPU acceleration */
}

/* Only animate on desktop, respect reduced motion */
@media (min-width: 992px) and (prefers-reduced-motion: no-preference) {
    .step-circle {
        animation: pulse 2s infinite;
    }
}

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.step-icon {
    font-size: 2rem;
}

.step-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.step-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.step-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.feature-tag {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.cta-description {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.cta-main-button {
    background: white;
    color: var(--primary-color);
    padding: 18px 35px;
    font-size: 1.3rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.cta-main-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    color: var(--primary-color);
    text-decoration: none;
}

.cta-secondary-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 18px 35px;
    font-size: 1.3rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-secondary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.3);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.cta-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.cta-feature-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.how-it-works-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 40px;
    font-size: 1.4rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.3);
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.how-it-works-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4);
    color: white;
    text-decoration: none;
}

.cta-subtitle {
    color: #666;
    font-style: italic;
    font-size: 1.1rem;
}

/* Animations - Simplified */
@keyframes bounce {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-10px) translateZ(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1) translateZ(0); }
    50% { transform: scale(1.05) translateZ(0); }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

/* Performance Optimizations */
.hero-section, .cta-section {
    contain: layout style paint;
}

.floating-elements {
    contain: layout style;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section,
    .title-main,
    .balloon,
    .sparkle,
    .feature-icon,
    .step-circle,
    .title-icon,
    .feature-highlight {
        animation: none !important;
    }
    
    .feature-card:hover,
    .gallery-card:hover,
    .step-container:hover {
        transform: none !important;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .title-icon {
        font-size: 1.5rem;
        margin: 0 10px;
    }
    
    .hero-section {
        padding: 40px 0;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 25px;
        padding: 0 15px;
    }
    
    .hero-buttons-group,
    .cta-buttons-group {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        padding: 0 15px;
    }
    
    .hero-main-button,
    .hero-secondary-button,
    .cta-main-button,
    .cta-secondary-button,
    .how-it-works-button {
        width: 100%;
        max-width: 280px;
        padding: 15px 20px;
        font-size: 1.1rem;
    }
    
    .features-section {
        margin: 40px 0;
    }
    
    .feature-card {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .feature-card p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .card-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
    
    .gallery-card {
        max-width: 100%;
    }
    
    .gallery-card-img {
        height: 180px;
    }
    
    .gallery-card-body {
        padding: 15px;
    }
    
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .card-date {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .step-container {
        padding: 25px 15px;
    }
    
    .step-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .step-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .step-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .cta-title {
        font-size: 2.2rem;
    }
    
    .cta-description {
        font-size: 1.1rem;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .gallery-card-img {
        height: 160px;
    }
    
    .gallery-card-body {
        padding: 12px;
    }
    
    .step-circle {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .step-container {
        padding: 20px 12px;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    .festive-button {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    .gallery-card {
        touch-action: manipulation;
    }
}

/* Optimize for mobile viewport */
@media (max-width: 768px) {
    .content-card {
        margin: 10px 5px;
        padding: 20px 15px;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

