/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f7e7ce, #d4a5a5, #a3c9e2);
    color: #333;
    position: relative;
}

/* Call to Action Button */
.cta-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #6b4e71;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.cta-btn:hover {
    background: #d4a5a5;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Butterfly Icon Styling */
.butterfly-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
    transition: stroke 0.3s ease;
}

.cta-btn:hover .butterfly-icon {
    stroke: #fff;
}

/* Pulse animation for the CTA button */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
}

/* Header and Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1100;
}

.navbar h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #6b4e71;
}

.navbar h1 a {
    text-decoration: none;
    color: #6b4e71;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 60%;
}

.nav-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #6b4e71;
    color: #fff !important;
    text-decoration: none;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn:hover {
    background: #d4a5a5;
    color: #fff !important;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* X Share Button */
.x-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem auto;
    padding: 0.75rem 1.5rem;
    background: #6b4e71;
    color: #ffffff;
    text-decoration: none;
    border-radius: 25px;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.x-btn:hover {
    background: #d4a5a5;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.x-btn .butterfly-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
}

/* Main Page Hero Section */
.hero {
    text-align: center;
    padding: 5rem 2rem;
    background: url('https://via.placeholder.com/1200x400?text=Butterfly+Hero') center/cover no-repeat;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
}

/* Subpage Hero Section papilionidae */
.subpage-hero {
    text-align: center;
    padding: 5rem 2rem;
    background: url('images/papilionidae-a-hero.jpg') center/cover no-repeat;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.subpage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(107, 78, 113, 0.3), rgba(211, 165, 165, 0.3));
    z-index: 1;
}

.subpage-hero h2, .subpage-hero p {
    position: relative;
    z-index: 2;
}

.subpage-hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subpage-hero p {
    font-size: 1.2rem;
}

/* Subpage Hero Section hesperiidae */
.subpage-hero-hesperiidae {
    text-align: center;
    padding: 5rem 2rem;
    background: url('images/hesperiidae-a-hero.jpg') center/cover no-repeat;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.subpage-hero-hesperiidae::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(107, 78, 113, 0.3), rgba(211, 165, 165, 0.3));
    z-index: 1;
}

.subpage-hero-hesperiidae h2, .subpage-hero-hesperiidae p {
    position: relative;
    z-index: 2;
}

.subpage-hero-hesperiidae h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subpage-hero-hesperiidae p {
    font-size: 1.2rem;
}

/* Subpage Hero Section pieridae */
.subpage-hero-pieridae {
    text-align: center;
    padding: 5rem 2rem;
    background: url('images/pieridae-a-hero.jpg') center/cover no-repeat;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.subpage-hero-pieridae::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(107, 78, 113, 0.3), rgba(211, 165, 165, 0.3));
    z-index: 1;
}

.subpage-hero-pieridae h2, .subpage-hero-pieridae p {
    position: relative;
    z-index: 2;
}

.subpage-hero-pieridae h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subpage-hero-pieridae p {
    font-size: 1.2rem;
}

/* Subpage Hero Section lycaenidae */
.subpage-hero-lycaenidae {
    text-align: center;
    padding: 5rem 2rem;
    background: url('images/lycaenidae-a-hero.jpg') center/cover no-repeat;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.subpage-hero-lycaenidae::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(107, 78, 113, 0.3), rgba(211, 165, 165, 0.3));
    z-index: 1;
}

.subpage-hero-lycaenidae h2, .subpage-hero-lycaenidae p {
    position: relative;
    z-index: 2;
}

.subpage-hero-lycaenidae h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subpage-hero-lycaenidae p {
    font-size: 1.2rem;
}

/* Subpage Hero Section riodinidae */
.subpage-hero-riodinidae {
    text-align: center;
    padding: 5rem 2rem;
    background: url('images/riodinidae-a-hero.jpg') center/cover no-repeat;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.subpage-hero-riodinidae::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(107, 78, 113, 0.3), rgba(211, 165, 165, 0.3));
    z-index: 1;
}

.subpage-hero-riodinidae h2, .subpage-hero-riodinidae p {
    position: relative;
    z-index: 2;
}

.subpage-hero-riodinidae h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subpage-hero-riodinidae p {
    font-size: 1.2rem;
}

/* Subpage Hero Section riodinidae */
.subpage-hero-nymphalidae {
    text-align: center;
    padding: 5rem 2rem;
    background: url('images/nymphalidae-a-hero.jpg') center/cover no-repeat;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.subpage-hero-nymphalidae::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(107, 78, 113, 0.3), rgba(211, 165, 165, 0.3));
    z-index: 1;
}

.subpage-hero-nymphalidae h2, .subpage-hero-nymphalidae p {
    position: relative;
    z-index: 2;
}

.subpage-hero-nymphalidae h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subpage-hero-nymphalidae p {
    font-size: 1.2rem;
}

/* Main Page Content Sections */
.content-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #6b4e71;
    margin-bottom: 1.5rem;
}

.content-section p {
    margin-bottom: 1rem;
}

/* Subpage Content Sections */
.subpage-content-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, #e2d1c3, #c9a8b9, #b3d4e8);
}

.subpage-content-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #6b4e71;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Subpage Species List */
.species-list {
    list-style: none;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.species-list li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(107, 78, 113, 0.2);
    transition: background 0.3s ease;
}

.species-list li:last-child {
    border-bottom: none;
}

.species-list li:hover {
    background: rgba(211, 165, 165, 0.1);
}

.species-list strong {
    color: #6b4e71;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
}

/* Pagination Section */
.pagination-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.pagination-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #6b4e71;
    margin-bottom: 1.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #6b4e71;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.pagination-link:hover {
    background: #d4a5a5;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.pagination-link.selected {
    background: #d4a5a5;
    cursor: default;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Main Page Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #6b4e71;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #d4a5a5;
}

/* Main Page Species Grid */
.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.species-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.species-card img {
    width: 100%;
    max-width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.species-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.species-card:hover img {
    transform: scale(1.05);
}

.species-card h3 {
    font-family: 'Playfair Display', serif;
    color: #6b4e71;
    margin-bottom: 0.5rem;
}

/* FAQ Section */
details {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

summary {
    cursor: pointer;
    font-weight: 400;
    color: #6b4e71;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: #6b4e71;
    color: #fff;
}

footer a {
    color: #d4a5a5;
    text-decoration: none;
}

/* Profile Scorecard Section */
.profile-section .profile-scorecard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-scorecard .scorecard-item {
    text-align: center;
    padding: 1rem;
    background: #f7e7ce;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-scorecard .scorecard-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-scorecard .scorecard-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #6b4e71;
    margin-bottom: 0.5rem;
}

.profile-scorecard .scorecard-item p {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #333;
}

/* Breadcrumb Navigation */
.breadcrumb-section {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, #e2d1c3, #c9a8b9, #b3d4e8);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #6b4e71;
}

.breadcrumb-link {
    text-decoration: none;
    color: #6b4e71;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    position: relative;
}

.breadcrumb-link:hover {
    color: #d4a5a5;
    text-decoration: underline;
}

.breadcrumb-separator {
    font-size: 1.2rem;
    color: #6b4e71;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
    }

    .nav-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1rem;
        max-width: 100%;
    }

    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .hero h2, .subpage-hero h2 {
        font-size: 2rem;
    }

    .hero p, .subpage-hero p {
        font-size: 1rem;
    }

    .species-grid {
        grid-template-columns: 1fr;
    }

    .species-card img {
        max-width: 200px;
        height: 200px;
    }

    .species-list li {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .species-list strong {
        font-size: 1rem;
    }

    .x-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .cta-container {
        top: 10px;
        right: 10px;
    }

    .cta-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .butterfly-icon {
        width: 16px;
        height: 16px;
    }

    /* Responsive Profile Scorecard */
    .profile-section .profile-scorecard {
        grid-template-columns: 1fr;
    }

    /* Responsive Breadcrumb */
    .breadcrumb-section {
        padding: 1rem;
    }

    .breadcrumb {
        font-size: 0.9rem;
    }

    .breadcrumb-separator {
        font-size: 1rem;
    }
}