* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
}

nav {
    background-color: #34495e;
    position: relative;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 1rem;
}

nav li {
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    white-space: nowrap;
}

nav a:hover {
    text-decoration: none;
    color: black;
}

nav ul li:hover {
    background-color: white;
}

nav ul li {
    display: flex;
    align-items: stretch;
}

nav ul li a {
    display: flex;
    align-items: center;
    width: 100%;
}

nav ul li.active {
    background-color: white;
}

nav ul li.active a {
    color: #34495e;
}

nav ul li.active a:hover {
    color: black;
}

nav ul li.active a:after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: #2980b9;
    margin-top: 5px;
}

/* Dropdown menu styles - apply to all screen sizes */
.dropmenu {
    position: relative;
}

.dropmenu-toggle {
    background-color: #34495e;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
}

.dropmenu-content {
    display: none;
    position: absolute;
    background-color: #34495e;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
}

.dropmenu-content.show {
    display: block;
}

.dropmenu-content ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.dropmenu-content li {
    padding: 0;
    border-bottom: 1px solid #2c3e50;
}

.dropmenu-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropmenu-content a:hover {
    background-color: white;
    color: black;
}

/* Dropdown menu for small screens */
@media screen and (max-width: 768px) {
    .dropmenu {
        position: relative;
        display: inline-block;
    }

    .dropmenu-checkbox {
        display: none; /* Hide the checkbox */
    }

    .dropmenu-toggle {
        background-color: #34495e;
        color: white;
        padding: 10px 15px;
        border: none;
        cursor: pointer;
        display: inline-block;
    }

    .dropmenu-content {
        display: none;
        position: absolute;
        background-color: #34495e;
        min-width: 200px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        z-index: 1000;
    }

    .dropmenu-checkbox:checked ~ .dropmenu-content {
        display: block; /* Show when checkbox is checked */
    }

    .dropmenu-content ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }

    .dropmenu-content li {
        padding: 0;
        border-bottom: 1px solid #2c3e50;
    }

    .dropmenu-content a {
        color: white;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
    }

    .dropmenu-content a:hover {
        background-color: white;
        color: black;
    }
}

.radio-player {
    background-color: black;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* push listeners badge to the right */
    gap: 10px;
    padding: 10px 12px;
    color: white;
}

.player-album-art {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 2px solid #fff;
    margin-right: 12px;
    display: none; /* shown when we have art */
}

.play-button {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 0 20px;
    cursor: pointer;
    font-size: 20px;
}

.song-info-container {
    overflow: hidden;
    flex: 1;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.song-info {
    white-space: nowrap;
    animation: scrollText 25s linear infinite;
    padding-right: 50px; /* Space between end and beginning when looping */
    line-height: 1.2;
    font-size: 0.9rem;
}

.song-info.line-1 {
    margin-bottom: 2px;
}

.song-info.line-2 {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Listeners badge */
.listeners-badge {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    border: 1px solid #fff;
    padding: 4px 8px;
    border-radius: 3px;
    color: #fff;
    background: rgba(255,255,255,0.08);
    white-space: nowrap;
}

/* Adjust animation speed and layout based on screen size */
@media screen and (max-width: 768px) {
    .song-info {
        animation-duration: 15s; /* Faster on medium screens */
        font-size: 0.85rem;
    }
    
    .song-info.line-2 {
        font-size: 0.75rem;
    }
    
    .radio-player {
        padding: 8px 0;
    }
}

@media screen and (max-width: 480px) {
    .song-info {
        animation-duration: 10s; /* Even faster on small screens */
        font-size: 0.8rem;
    }
    
    .song-info.line-2 {
        font-size: 0.7rem;
    }
    
    .play-button {
        width: 35px;
        height: 35px;
        margin: 0 15px;
        font-size: 18px;
        margin-right: 12px;
    }
    .listeners-badge {
        font-family: 'Courier New', Courier, monospace;
        font-size: 0.85rem;
        border: 1px solid #fff;
        padding: 4px 8px;
        border-radius: 3px;
        color: #fff;
        background: rgba(255,255,255,0.08);
        white-space: nowrap;
    }
    .radio-player {
        padding: 6px 0;
    }
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.hero {
    background-color: #ecf0f1;
    padding: 3rem 1rem;
    text-align: center;
}

.blog-post {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}
.post-title {
    font-size: 1.8em;
    color: #333;
}
.post-date {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}
.post-content {
    margin-top: 15px;
    padding: 10px 0;
}
#blog-container {
    margin-top: 40px;
    padding: 20px;
    background-color: white;
    border: 2px solid #2c3e50;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.back-link {
    display: block;
    margin-top: 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 0;
}

.blog-post-card {
    border: 2px solid #2c3e50;
    padding: 20px;
    background-color: white;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.blog-post-card:hover {
    border-color: #3498db;
}

.blog-post-card .post-title {
    margin-top: 0;
    font-size: 1.4rem;
    padding-bottom: 10px;
    color: #2c3e50;
    font-weight: bold;
    line-height: 1.2;
    font-family: 'Courier New', Courier, monospace;
    border-bottom: 2px solid #2c3e50;
    margin-bottom: 10px;
}

.blog-post-card .post-date {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: normal;
}

.blog-post-card .post-preview {
    color: #333;
    line-height: 1.5;
    padding: 10px 0;
    font-size: 0.95rem;
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
}

.blog-post-card .read-more {
    margin-top: 15px;
    color: #2c3e50;
    font-weight: bold;
    font-size: 0.9rem;
    font-family: 'Courier New', Courier, monospace;
    text-decoration: underline;
}

.blog-post-card .read-more:hover {
    color: #34495e;
}

/* Estilo para post completo */
.blog-post.full {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background-color: white;
    border: 2px solid #2c3e50;
    line-height: 1.6;
}

.back-button {
    display: inline-block;
    margin-bottom: 20px;
    color: #2c3e50;
    cursor: pointer;
    font-weight: bold;
    padding: 10px 15px;
    font-family: 'Courier New', Courier, monospace;
    border: 2px solid #2c3e50;
    background-color: white;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-button:hover {
    background-color: #2c3e50;
    color: white;
}

/* Blog post title header */
.post-title-header {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    background-color: #2c3e50;
    padding: 1rem;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.2;
    border: none;
}

/* Enhanced Markdown Formatting */
.post-content {
    margin-top: 15px;
    padding: 10px 0;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    color: #333;
}

/* Headings */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.2;
    color: #2c3e50;
    font-family: 'Courier New', Courier, monospace;
}

.post-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 0.5rem;
    color: white;
    background-color: #2c3e50;
    padding: 1rem;
    margin-top: 0;
}

.post-content h2 {
    font-size: 1.6rem;
    border-bottom: 1px solid #2c3e50;
    padding-bottom: 0.3rem;
}

.post-content h3 {
    font-size: 1.4rem;
}

.post-content h4 {
    font-size: 1.2rem;
}

.post-content h5 {
    font-size: 1.1rem;
}

.post-content h6 {
    font-size: 1rem;
    text-transform: uppercase;
}

/* Paragraphs */
.post-content p {
    margin-bottom: 1rem;
    text-align: left;
}

/* Lists */
.post-content ul,
.post-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.post-content ul li {
    list-style-type: disc;
}

.post-content ol li {
    list-style-type: decimal;
}

/* Links */
.post-content a {
    color: #3498db;
    text-decoration: underline;
}

.post-content a:hover {
    color: #2980b9;
}

/* Blockquotes */
.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem;
    border-left: 4px solid #2c3e50;
    background-color: #f5f5f5;
    font-style: italic;
    color: #333;
}

.post-content blockquote p {
    margin-bottom: 0;
}

/* Code */
.post-content code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #333;
    border: 1px solid #ccc;
}

.post-content pre {
    background-color: #f5f5f5;
    color: #333;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    border: 2px solid #2c3e50;
    font-family: 'Courier New', Courier, monospace;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    color: inherit;
    font-size: 0.9rem;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    border: 2px solid #2c3e50;
}

.post-content th,
.post-content td {
    padding: 0.8rem;
    text-align: left;
    border: 1px solid #2c3e50;
}

.post-content th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #2c3e50;
}

.post-content tr:hover {
    background-color: #f9f9f9;
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border: 2px solid #2c3e50;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Horizontal Rule */
.post-content hr {
    margin: 2rem 0;
    border: none;
    height: 2px;
    background-color: #2c3e50;
}

/* Strong and Emphasis */
.post-content strong {
    font-weight: bold;
    color: #2c3e50;
}

.post-content em {
    font-style: italic;
    color: #333;
}

/* Mark/Highlight */
.post-content mark {
    background-color: yellow;
    padding: 0.1rem 0.3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-content h1 {
        font-size: 1.6rem;
    }
    
    .post-content h2 {
        font-size: 1.4rem;
    }
    
    .post-content h3 {
        font-size: 1.2rem;
    }
    
    .post-content {
        padding: 5px 0;
    }
    
    .post-content ul,
    .post-content ol {
        padding-left: 1.5rem;
    }
    
    .post-content blockquote {
        padding: 0.8rem;
        margin: 1rem 0;
    }
    
    .post-content pre {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
    
    .post-content table {
        font-size: 0.8rem;
    }
    
    .post-content th,
    .post-content td {
        padding: 0.5rem;
    }
}

/* Mobile responsive for post header */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }
    
    .blog-post-card {
        padding: 20px;
        margin: 0;
    }
    
    .blog-post-card .post-title {
        font-size: 1.3rem;
    }
    
    .blog-post.full {
        padding: 20px;
        margin: 15px;
    }
    
    .back-button {
        padding: 8px 12px;
        font-size: 0.8rem;
        margin-bottom: 20px;
    }
    
    #blog-container {
        margin-top: 20px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        gap: 10px;
    }
    
    .blog-post-card {
        padding: 15px;
    }
    
    .blog-post-card .post-title {
        font-size: 1.2rem;
    }
    
    .blog-post.full {
        padding: 15px;
        margin: 10px;
    }
}

.content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.main-content {
    flex: 1;
    min-width: 300px;
}
.sidebar {
    width: 300px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

a:hover {
    text-decoration: underline;
}
#rss-news {
    margin: 0 auto;
}

#dados-meteorologicos {
    margin-top: 20px;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}
.weather-item {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    box-sizing: border-box;
}
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
}
th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    word-break: break-word;
}
th {
    background-color: #f2f2f2;
}

/* Mobile responsiveness */
@media screen and (max-width: 600px) {
    .weather-item {
        padding: 8px;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 6px 4px;
    }
}

.maps-container {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 1000px;
}
.islands-container {
    width: 40%;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #000;
    padding-right: 10px;
}
#map-azores {
    height: 48%;
    margin-bottom: 4%;
    border-bottom: 2px solid #000;
}
#map-madeira {
    height: 48%;
}
#map {
    height: 100%;
    width: 60%;
    margin-left: 10px;
}

.contact-info, .contact-form {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.contact-info h1, .contact-form h2 {
    text-align: center;
}
.contact-details {
    display: flex;
    justify-content: space-between;
}
.contact-details div {
    width: 30%;
}

.contact-info, .contact-form {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.contact-info h1, .contact-form h2 {
    text-align: center;
}
.contact-details {
    display: flex;
    justify-content: space-between;
}
.contact-details div {
    width: 30%;
}
.contact-details h3 {
    margin-bottom: 10px;
}
.contact-details p {
    margin: 0;
}
.contact-form {
    margin-top: 20px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.form-group textarea {
    resize: vertical;
}
.submit-btn {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.submit-btn:hover {
    background-color: #2980b9;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
}

/* Footer history menu */
.footer-history {
    margin: 10px auto;
    max-width: 980px;
}

.footer-history-toggle {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.footer-history-menu {
    margin-top: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 10px 12px;
    text-align: left;
}

.footer-history-header {
    font-weight: bold;
    margin-bottom: 6px;
}

.footer-history-list {
    margin: 0;
    padding-left: 18px;
}

.footer-history-list li {
    line-height: 1.4;
    margin: 2px 0;
    opacity: 0.9;
}
