/* Landing Page Styles */

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.site-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: bold;
    background: linear-gradient(135deg, var(--gold), var(--orange), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(212, 160, 23, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

.site-subtitle {
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: var(--cream);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--cream);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 180px;
    justify-content: center;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.4);
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 160, 23, 0.6);
}

.cta-button.secondary {
    background: transparent;
    color: var(--cream);
    border: 2px solid var(--gold);
}

.cta-button.secondary:hover {
    background: var(--gold);
    color: var(--dark);
    transform: translateY(-3px);
}

/* Countries Section */
.countries-section {
    padding: 4rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--gold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--cream);
    opacity: 0.9;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(3, 400px);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    justify-content: center;
}

.country-card {
    width: 400px;
    height: 400px;
    border: 2px solid var(--purple);
    border-radius: 20px;
    text-align: center;
    position: relative;
    perspective: 1000px; /* Enable 3D flip effect */
    overflow: hidden;
}

.country-card.featured {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 160, 23, 0.3);
}

.country-card.featured:hover {
    box-shadow: 0 10px 30px rgba(212, 160, 23, 0.5);
}

.country-card.coming-soon {
    opacity: 0.7;
}

.country-card.coming-soon:hover {
    opacity: 0.9;
}

/* Flip Card Structure */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.country-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Front Side (Background Image Only) */
.flip-card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Back Side (Content with Overlay and Background Image) */
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px; /* Match country-card border-radius */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Set background images for both front and back */
.country-card[data-country="egypt"] .flip-card-front,
.country-card[data-country="egypt"] .flip-card-back {
    background-image: url('/public/images/egypt-cartoon.png');
}

.country-card[data-country="rome"] .flip-card-front,
.country-card[data-country="rome"] .flip-card-back {
    background-image: url('/public/images/rome-cartoon.png');
}

.country-card[data-country="greece"] .flip-card-front,
.country-card[data-country="greece"] .flip-card-back {
    background-image: url('/public/images/greece-cartoon.png');
}

.country-card[data-country="china"] .flip-card-front,
.country-card[data-country="china"] .flip-card-back {
    background-image: url('/public/images/china-cartoon.png');
}

.country-card[data-country="maya"] .flip-card-front,
.country-card[data-country="maya"] .flip-card-back {
    background-image: url('/public/images/maya-cartoon.png');
}

.country-card[data-country="vikings"] .flip-card-front,
.country-card[data-country="vikings"] .flip-card-back {
    background-image: url('/public/images/vikings-cartoon.png');
}

/* Dark overlay for back side */
.flip-card-back::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(35, 25, 40, 0.85);
    z-index: 1;
    transition: background 0.3s ease;
}

.country-card:hover .flip-card-back::after {
    background: rgba(35, 25, 40, 0.7);
}

/* Shine effect for back side */
.flip-card-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 160, 23, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 2;
}

.country-card:hover .flip-card-back::before {
    left: 100%;
}

/* Ensure content is above overlays */
.flip-card-back > * {
    position: relative;
    z-index: 3;
}

.country-image {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.country-icon {
    font-size: 3rem;
    color: var(--gold);
    background: rgba(212, 160, 23, 0.1);
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.country-card:hover .country-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 160, 23, 0.4);
}

.country-cartoon {
    display: none; /* Hide img as it's used for background */
}

.country-card.coming-soon .country-icon {
    color: var(--purple);
    background: rgba(128, 90, 213, 0.1);
}

.country-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.country-content h3 {
    font-size: 1.6rem;
    color: var(--cream);
    margin-bottom: 0.8rem;
    font-weight: bold;
}

.country-content p {
    color: var(--cream);
    opacity: 0.9;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.country-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.highlight {
    background: rgba(212, 160, 23, 0.2);
    color: var(--gold);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.explore-btn {
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: var(--dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    font-size: 0.9rem;
    margin-top: auto;
}

.explore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 160, 23, 0.4);
}

.coming-soon-badge {
    background: var(--purple);
    color: var(--cream);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

/* Home Button */
.home-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: var(--dark);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    z-index: 10;
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 160, 23, 0.4);
}

/* Features Section */
.features-section {
    padding: 4rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(35, 25, 40, 0.8);
    border: 1px solid var(--purple);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 5px 20px rgba(212, 160, 23, 0.2);
}

.feature-icon {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--cream);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--cream);
    opacity: 0.9;
    line-height: 1.6;
}

/* Footer Section */
.footer-section {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    z-index: 10;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(212, 160, 23, 0.1);
    color: var(--gold);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--gold);
    color: var(--dark);
    transform: translateY(-3px);
}

.footer-text {
    color: var(--cream);
    opacity: 0.8;
}

/* Timeline Container (hidden by default) */
.timeline-container.hidden {
    display: none;
}

.timeline-mode .hero-section,
.timeline-mode .countries-section,
.timeline-mode .features-section,
.timeline-mode .footer-section {
    display: none;
}

.timeline-mode .timeline-container {
    display: block;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .countries-grid {
        grid-template-columns: repeat(3, 350px);
    }
    
    .country-card {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 1200px) {
    .countries-grid {
        grid-template-columns: repeat(2, 350px);
    }
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .country-card {
        width: 100%;
        max-width: 350px;
        height: 350px;
        margin: 0 auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 1rem;
    }
    
    .countries-section,
    .features-section {
        padding: 2rem 1rem;
    }
    
    .country-card {
        height: 320px;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}