/* General Setup */
:root {
    --body-bg: #ffffff;
    --body-text: #333333;
    --headline-bg: #ffffff;
    --headline-text: #000000;
    --footer-bg: #f5f5f5;
    --footer-text: #555555;
    --source-text: #555555;
    --footer-border: #e0e0e0;
    --header-height: 80px; /* Coincide con estilocomun.css */
    --nav-footer-height: 60px; /* Ajustado */
}

/* Main Layout */
.full-page {
    min-height: 100vh;
    transition: opacity 0.6s ease-in-out;
    position: relative;
    opacity: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.page-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: var(--header-height) auto 0;
    padding: 0 20px var(--nav-footer-height);
    box-sizing: border-box;
    background-color: transparent;
    overflow-y: auto;
}

/* Titles */
h1 {
    text-align: center;
    font-size: clamp(24px, 5vw, 32px);
    margin: 10px 0;
    font-weight: 600;
    font-family: 'Bangers', cursive;
    color: var(--body-text);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    box-sizing: border-box;
    margin: 0;
    background-color: var(--body-bg);
}

/* Headlines List */
.headlines-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

li {
    font-size: 18px;
    display: block;
    position: relative;
    overflow: hidden;
    background-color: var(--headline-bg);
}

.headline-link {
    display: block;
    padding: 0;
    text-decoration: none;
    color: var(--headline-text);
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
    opacity: 1;
}

.headline-link.visible {
    animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

body.nacionales .headline-link { background-color: #5c7ce41c; }
body.internacional .headline-link { background-color: #0288d11c; }
body.deportes .headline-link { background-color: #2e7d321c; }
body.sucesos .headline-link { background-color: #d32f2f1c; }
body.entretenimiento .headline-link { background-color: #f57c001c; }

.headline-link:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body.nacionales .headline-link:hover { background-color: #5c7ce456; }
body.internacional .headline-link:hover { background-color: #0288d156; }
body.deportes .headline-link:hover { background-color: #2e7d3256; }
body.sucesos .headline-link:hover { background-color: #d32f2f56; }
body.entretenimiento .headline-link:hover { background-color: #f57c0056; }

.headline-link:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease;
}

.headline-container {
    display: block;
    width: 100%;
}

.headline-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0;
    display: block;
    padding: 0;
}

body.nacionales .headline-image { background-color: #50def7; }
body.internacional .headline-image { background-color: #81d4fa; }
body.deportes .headline-image { background-color: #a5d6a7; }
body.sucesos .headline-image { background-color: #ef9a9a; }
body.entretenimiento .headline-image { background-color: #ffcc80; }

.headline-text {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--headline-text);
    padding: 10px;
}

/* Headline Footer */
.headline-footer {
    padding: 10px 15px;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--footer-border);
    background-color: var(--footer-bg);
}

body.nacionales .headline-footer { background-color: #e3f2fd; }
body.internacional .headline-footer { background-color: #e0f7fa; }
body.deportes .headline-footer { background-color: #e8f5e9; }
body.sucesos .headline-footer { background-color: #ffebee; }
body.entretenimiento .headline-footer { background-color: #fff3e0; }

/* Source Container */
.source-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.source-logo {
    height: 20px;
    width: auto;
    vertical-align: middle;
}

.source-name {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--source-text);
}

body.nacionales .source-name { color: #1DA1F2; }
body.internacional .source-name { color: #0288d1; }
body.deportes .source-name { color: #2e7d32; }
body.sucesos .source-name { color: #d32f2f; }
body.entretenimiento .source-name { color: #f57c00; }

/* Actions Container */
.actions-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Like Container */
.like-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.like-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.like-button i {
    font-size: 20px;
    transition: color 0.3s ease;
}

body.nacionales .like-button i { color: #1DA1F2; }
body.internacional .like-button i { color: #0288d1; }
body.deportes .like-button i { color: #2e7d32; }
body.sucesos .like-button i { color: #d32f2f; }
body.entretenimiento .like-button i { color: #f57c00; }

.like-button:hover i, .like-button.liked i {
    color: #ff0000;
}

.like-button.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.like-count {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #555555;
    line-height: 1;
}

body.nacionales .like-count { color: #1DA1F2; }
body.internacional .like-count { color: #0288d1; }
body.deportes .like-count { color: #2e7d32; }
body.sucesos .like-count { color: #d32f2f; }
body.entretenimiento .like-count { color: #f57c00; }

/* Copy Icon */
.copy-icon {
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

body.nacionales .copy-icon { color: #1DA1F2; }
body.internacional .copy-icon { color: #0288d1; }
body.deportes .copy-icon { color: #2e7d32; }
body.sucesos .copy-icon { color: #d32f2f; }
body.entretenimiento .copy-icon { color: #f57c00; }

.copy-icon:hover {
    color: #ff0000;
}

/* Media Queries */
@media (max-width: 1024px) {
    .page-container {
        max-width: 100%;
        padding: 0 10px var(--nav-footer-height);
    }

    h1 {
        font-size: clamp(22px, 4.5vw, 28px);
        margin: 8px 0;
    }

    .headlines-list {
        gap: 12px;
    }

    li {
        font-size: 16px;
    }

    .headline-image {
        max-height: 400px;
    }

    .headline-text {
        font-size: 14px;
        padding: 8px;
    }

    .headline-footer {
        padding: 8px 12px;
    }

    .source-name {
        font-size: 12px;
    }

    .like-button i {
        font-size: 18px;
    }

    .like-count {
        font-size: 12px;
    }

    .copy-icon {
        font-size: 18px;
    }

    .actions-container {
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .page-container {
        max-width: 100%;
        padding: 0 5px var(--nav-footer-height);
    }

    h1 {
        font-size: clamp(20px, 4.5vw, 26px);
        margin: 8px 0;
    }

    .headlines-list {
        gap: 10px;
    }

    li {
        font-size: 16px;
    }

    .headline-image {
        max-height: 300px;
    }

    .headline-text {
        font-size: 14px;
        padding: 10px;
    }

    .headline-footer {
        padding: 8px 12px;
    }

    .source-name {
        font-size: 12px;
    }

    .like-button i {
        font-size: 18px;
    }

    .like-count {
        font-size: 12px;
    }

    .copy-icon {
        font-size: 18px;
    }

    .actions-container {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .page-container {
        max-width: 100%;
        padding: 0 5px var(--nav-footer-height);
    }

    h1 {
        font-size: clamp(18px, 4vw, 22px);
        margin: 6px 0;
    }

    .headlines-list {
        gap: 8px;
    }

    li {
        font-size: 14px;
    }

    .headline-text {
        font-size: 13px;
        padding: 10px;
    }

    .headline-footer {
        padding: 6px 10px;
    }

    .source-name {
        font-size: 11px;
    }

    .like-button i {
        font-size: 16px;
    }

    .like-count {
        font-size: 11px;
    }

    .copy-icon {
        font-size: 16px;
    }

    .actions-container {
        gap: 5px;
    }
}

body.tecnologia .headline-link { background-color: #7e57c21c; }
body.tecnologia .headline-link:hover { background-color: #7e57c256; }
body.tecnologia .headline-image { background-color: #d1c4e9; }
body.tecnologia .headline-footer { background-color: #ede7f6; }
body.tecnologia .source-name { color: #7e57c2; }
body.tecnologia .like-button i { color: #7e57c2; }
body.tecnologia .like-count { color: #7e57c2; }
body.tecnologia .copy-icon { color: #7e57c2; }