:root {
    --primary: #0057a8; /* NoticiasTrabajo brand color */
    --primary-hover: #004380;
    --bg-color: #f3f6f9;
    --text: #333;
    --border: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    line-height: 1.6;
}

.app-header {
    background: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 87, 168, 0.2);
}

.btn-secondary {
    background: #1e293b;
    color: white;
}

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

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
}

.glass-panel h2 {
    margin-bottom: 0.5rem;
    color: #0f172a;
}
.glass-panel p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    gap: 1rem;
}

.input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.2s;
    outline: none;
}
.input-group input:focus {
    border-color: var(--primary);
}

.status-msg {
    margin-top: 1rem;
    font-weight: 600;
    font-size: 14px;
}
.status-success { color: #10b981; }
.status-error { color: #ef4444; }

.gallery-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

.card-item {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1080 / 1920; 
}
.card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    font-weight: 600;
}
.card-item:hover .card-overlay {
    opacity: 1;
}

.card-download {
    margin-top: 10px;
    padding: 8px 16px;
    background: white;
    color: var(--text);
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .input-group { flex-direction: column; }
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
