body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Header Styles */
.ingv-header {
    background-color: #003366;
    color: #ffffff;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ingv-header .header-content {
    max-width: 960px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.ingv-header .ingv-logo {
    max-width: 160px;
    height: auto;
    flex-shrink: 0;
}

.ingv-header .header-text {
    flex-grow: 1;
}

.ingv-header .db-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
}

.ingv-header .db-subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Main Content Styles */
main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    background-color: #ffffff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#image-section {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
}

.image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.main-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.image-caption-tooltip {
    visibility: hidden;
    width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 105%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    line-height: 1.4;
}

.image-caption-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.image-container:hover .image-caption-tooltip {
    visibility: visible;
    opacity: 1;
}

h2 {
    color: #004d40;
    border-bottom: 2px solid #004d40;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

h4 {
    color: #004d40;
    margin-top: 2em;
    margin-bottom: 0.8em;
}

.btn {
    display: inline-block;
    background-color: #00796b;
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

.btn:hover {
    background-color: #004d40;
}

.citation-box {
    background-color: #e0f2f1;
    border-left: 5px solid #00796b;
    padding: 1.5rem;
    position: relative;
    font-family: monospace;
    font-size: 0.95rem;
    word-break: break-all;
}

.license-info {
    background-color: #eef;
    border-left: 5px solid #003366;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

#copy-btn, #copy-url-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #004d40;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#copy-btn:hover, #copy-url-btn:hover {
    background-color: #00251a;
}

/* Footer Styles */
footer {
    padding: 2rem 1rem;
    background-color: #333;
    color: #f4f4f4;
    margin-top: 2rem;
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.footer-top {
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #555;
    margin-bottom: 1.5rem;
}

.footer-top p {
    margin: 0;
}

.footer-bottom {
    justify-content: center;
}

.footer-bottom img {
    max-height: 80px;
    width: auto;
}

.ingv-footer-logo {
    max-height: 100px;
    width: auto;
}

.open-data-logo {
    max-height: 200px;
    width: auto;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .ingv-header .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .ingv-header .ingv-logo {
        max-width: 140px;
    }
    
    .ingv-header .db-title {
        font-size: 1.5rem;
    }

    .ingv-header .db-subtitle {
        font-size: 0.9rem;
    }

    .btn {
        display: block;
        margin: 0.5rem auto;
        width: calc(100% - 3rem);
        text-align: center;
    }

    #copy-btn, #copy-url-btn {
        position: static;
        margin-top: 1rem;
        width: 100%;
    }
    
    .footer-top {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}
