
/* Parchment History Section */
.history-section {
    margin: 50px 0;
    position: relative;
}

.parchment {
    background: linear-gradient(135deg, #f4e7d7 0%, #f0dcc9 50%, #e8d5bf 100%);
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(139, 69, 19, 0.1) 2px, transparent 3px),
        radial-gradient(circle at 50px 75px, rgba(160, 82, 45, 0.1) 1px, transparent 2px);
    border: 3px solid #d4a574;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 
        inset 0 0 20px rgba(139, 69, 19, 0.1),
        0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    margin: 20px 0;
}

.parchment::before,
.parchment::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #d4a574;
    border-radius: 50%;
    top: -10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.parchment::before {
    left: 30px;
}

.parchment::after {
    right: 30px;
}

.story-title {
    font-family: 'Times New Roman', serif;
    font-size: 2.8rem;
    text-align: center;
    color: #8B4513;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    font-weight: 700;
    letter-spacing: 1px;
}

.story-content {
    font-family: var(--body-font);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #5D4E37;
    text-align: justify;
    columns: 2;
    column-gap: 40px;
    column-rule: 1px solid rgba(212, 165, 116, 0.3);
}

.story-content p {
    margin-bottom: 20px;
    text-indent: 20px;
    break-inside: avoid;
}

.story-content p:first-of-type {
    font-size: 1.2rem;
    font-weight: var(--font-medium);
    color: #8B4513;
}

.image-placeholder {
    width: fit-content;
    max-width: 100%;
    background: rgba(139, 69, 19, 0.1);
    border: 2px dashed #d4a574;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8B4513;
    font-style: italic;
    margin: 20px auto;
    break-inside: avoid;
    font-size: 0.95rem;
    text-align: center;
    padding: 10px;
}

.image-placeholder img {
    max-width: 100%;
    height: auto; 
    max-height: 400px;  
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.figure-caption {
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    font-style: italic;
    line-height: 1.4;
    padding: 0 10px;
    margin: 0 0 20px 0; 
}

/* Bacterial Cards - Vertical and Compact */
.bacteria-section {
    margin: 50px 0;
}

.bacteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.bacteria-card {
    background: var(--container-color);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 140px;
}

.flip-card {
    background-color: transparent;
    perspective: 1000px;
    height: 100%;
    width: 100%;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.flip-card-front {
    background: linear-gradient(135deg, #1e5289 0%, var(--par-title-color) 100%);
    color: white;
}

.flip-card-back {
    background: linear-gradient(135deg, var(--par-title-color) 0%, #1e5289 100%);
    color: white;
    transform: rotateY(180deg);
}

.bacteria-name {
    font-size: 1.1rem;
    color: white;
    font-weight: 700;
    margin-bottom: 12px;
    font-style: italic;
    text-align: center;
    line-height: 1.3;
}

.degradation-title {
    font-size: 1.2rem;
    color:white;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.2;
}

.degradation-description {
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: center;
    opacity: 0.95;
    line-height: 1.3;
}

.bacteria-reference {
    font-size: 0.75rem;
    opacity: 0.8;
    font-style: italic;
    text-align: center;
}

/* Missing Piece Section */
.missing-piece {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    padding: 40px;
    border-radius: 15px;
    margin: 40px 0;
    color: var(--par-title-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.missing-piece h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-style: italic;
    font-weight: 700;
    color: #2d3436;
}

.missing-piece p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.missing-piece em {
    font-weight: var(--font-medium);
    color: #2d3436;
}

/* Problems Section */
.problems-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 40px 0;
}

.problem-card {
    background: var(--container-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 5px solid #1e5289;
}

.problem-card[data-animation="slide-right"] {
    transform: translateX(100px);
    border-left: none;
    border-right: 5px solid var(--par-title-color);
}

.problem-card.animate {
    opacity: 1;
    transform: translateX(0);
}

.problem-card {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.problem-card h3 {
    color: var(--par-title-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.problem-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

.problem-card ol li {
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Toolkit Sections */
.toolkit-section {
    margin: 60px 0;
}

.toolkit-card {
    background: var(--container-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.toolkit-text h3 {
    color: var(--par-title-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 30px 0 15px 0;
}

.toolkit-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.toolkit-image {
    width: auto;
    height: 40px;
    background: rgba(30, 82, 137, 0.1);
    border: 2px dashed #1e5289;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e5289;
    padding: 2px;

}


/* Specialized toolkit cards */
.hero-card {
    border-top: 8px solid #87bcdb;
}

.cape-card {
    border-top: 8px solid #6c5ce7;
}

.helmet-card {
    border-top: 8px solid #b80000;
}

/* Want to know more? */
.hero-cta-section {
    text-align: center;
    padding: 2.5rem;
    margin: 3rem auto;
    max-width: 700px;
    background: linear-gradient(135deg, rgba(4, 49, 96, 0.03), rgba(30, 82, 137, 0.05));
    border-radius: 12px;
    border: 2px solid rgba(4, 49, 96, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(4, 49, 96, 0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.hero-cta-text {
    font-style: italic;
    color: #043160;
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.hero-cta-emoji {
    display: inline-block;
    font-size: 1.3rem;
    animation: bounceEmoji 2s ease-in-out infinite;
    margin: 0 0.3rem;
}

@keyframes bounceEmoji {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.hero-cta-emoji {
    display: inline-block;
    font-size: 1.3rem;
    animation: bounceEmoji 2s ease-in-out infinite;  /* ← usa bounceEmoji */
    margin: 0 0.3rem;
}

.hero-link {
    color: #1e5289;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    padding: 0 0.2rem;
}

.hero-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #043160, #1e5289);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.hero-link:hover {
    color: #063971;
    transform: translateY(-1px);
}

.hero-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-cta-section {
        padding: 2rem 1.5rem;
        margin: 2rem auto;
    }

    .hero-cta-text {
        font-size: 1rem;
    }

    .hero-cta-emoji {
        font-size: 1.1rem;
    }
}

/* Summary */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 10px;
    align-items: start;
}

.summary-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    background: rgba(30, 82, 137, 0.1);
    border: 2px dashed #1e5289;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e5289;
    padding: 10px;
    overflow: hidden;
}

.summary-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* References Section */
.references-section {
    margin-top: 3rem;
}

.references-toggle {
    background: linear-gradient(135deg, #043160, #1e5289);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(4, 49, 96, 0.3);
}

.references-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 49, 96, 0.4);
}

.references-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.references-arrow {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.references-toggle.active .references-arrow {
    transform: rotate(180deg);
}

.references-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.references-content.expanded {
    max-height: 3000px;
    overflow-y: auto;
}

.references-list {
    padding: 2rem;
    list-style: none;
    margin: 0;
}

.references-list li {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-left: 4px solid var(--par-title-color);
    border-radius: 4px;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .story-content {
        columns: 1;
        column-rule: none;
    }
    
    .bacteria-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .story-title {
        font-size: 2.2rem;
    }
    
    .parchment {
        padding: 25px;
    }
    
    .story-content p {
        text-indent: 15px;
    }
    
    .bacteria-card {
        height: 260px;
    }
    
    .bacteria-name {
        font-size: 1rem;
    }
    
    .degradation-title {
        font-size: 1.1rem;
    }
    
    .toolkit-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .toolkit-card {
        padding: 25px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .problem-card {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .story-title {
        font-size: 1.8rem;
    }
    
    .parchment {
        padding: 20px;
    }
    
    .bacteria-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .bacteria-card {
        height: 240px;
    }
    
    .flip-card-front, .flip-card-back {
        padding: 15px;
    }
    
    .bacteria-name {
        font-size: 0.9rem;
    }
    
    .degradation-title {
        font-size: 1rem;
    }
    
    .degradation-description {
        font-size: 0.8rem;
    }
    
    .toolkit-card {
        padding: 20px;
    }
    
    .toolkit-image {
        height: 150px;
    }
    
    .problem-card {
        padding: 20px;
    }
}