.subpage-container {
    position: relative;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.subpage-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 166, 40, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    animation: rotate 20s linear infinite;
}

.subpage-title {
    color: #F4A628;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    animation: slideInDown 0.6s ease-out;
}

.subpage-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f4a628, transparent);
}

.subpage-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.info-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(244, 166, 40, 0.1), rgba(104, 72, 20, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.info-image {
    position: relative;
    overflow: hidden;
    max-height: 400px;
}

.info-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 8s ease;
    display: block;
}

.info-card:hover .info-image img {
    transform: scale(1.1);
}

.info-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    z-index: 1;
    transition: left 0.7s ease-out;
}

.info-card:hover .info-image::before {
    animation: shine 1.5s;
}

.info-text {
    padding: 1.5rem;
    color: #383227;
}

.info-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    position: relative;
    padding-left: 1rem;
}

.info-text p:last-child {
    margin-bottom: 0;
}

.info-text p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #f4a628;
}

.back-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background-color: #684814;
    color: white;
    text-decoration: none;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #f4a628, #d35400);
    transition: width 0.3s ease;
    z-index: -1;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.back-button:hover::before {
    width: 100%;
}

.decorative-element {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: rgba(244, 166, 40, 0.1);
    border-radius: 50%;
    filter: blur(20px);
    z-index: -1;
}

.element-1 {
    top: 10%;
    right: 5%;
    animation: float 8s ease-in-out infinite;
}

.element-2 {
    bottom: 15%;
    left: 10%;
    width: 150px;
    height: 150px;
    background-color: rgba(104, 72, 20, 0.1);
    animation: float 10s ease-in-out infinite 1s;
}

.peru-symbol {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0.6;
    z-index: 2;
    pointer-events: none;
}

.symbol-1 {
    top: 10%;
    right: 10%;
    animation: spin 20s linear infinite;
}

.symbol-2 {
    bottom: 15%;
    left: 8%;
    animation: spin 25s linear infinite reverse;
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shine {
    100% {
        left: 150%;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.interactive-map {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 2rem 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-point {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #f4a628;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.map-point::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(244, 166, 40, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: pulse 2s infinite;
}

.map-point:hover {
    transform: translate(-50%, -50%) scale(1.2);
    background-color: #d35400;
}

.map-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    color: #383227;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.map-point:hover .map-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .subpage-content {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .info-card {
        flex: 1 1 calc(50% - 1rem);
        min-width: 300px;
    }
}

.fun-fact {
    position: relative;
    background-color: rgba(244, 166, 40, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    margin: 1.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.fun-fact::before {
    content: '🇵🇪 Ciekawostka';
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #684814;
}

.fun-fact:hover {
    background-color: rgba(244, 166, 40, 0.2);
    transform: scale(1.02);
}

.fun-fact-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.fun-fact.active .fun-fact-content {
    max-height: 200px;
}

.animated-flag {
    width: 200px;
    height: 120px;
    margin: 2rem auto;
    position: relative;
    perspective: 1000px;
}

.flag-front, .flag-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
}

.flag-back {
    transform: rotateY(180deg);
}

.animated-flag:hover .flag-front {
    transform: rotateY(180deg);
}

.animated-flag:hover .flag-back {
    transform: rotateY(0deg);
}

.language-chart {
    width: 100%;
    height: 40px;
    background-color: #f5f5f5;
    border-radius: 20px;
    overflow: hidden;
    margin: 1.5rem 0;
    position: relative;
}

.language-bar {
    height: 100%;
    float: left;
    transition: width 1s ease-out;
}

.spanish {
    background-color: #f4a628;
    width: 0%;
}

.quechua {
    background-color: #684814;
    width: 0%;
}

.aymara {
    background-color: #d35400;
    width: 0%;
}

.language-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    padding: 0 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.population-counter {
    font-size: 2.5rem;
    font-weight: bold;
    color: #684814;
    text-align: center;
    margin: 2rem 0;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(244, 166, 40, 0.5);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, opacity 0.3s;
}