/* Variables y Reset */
:root {
    --primary-color: #ff6f61; /* Color anaranjado de los botones */
    --secondary-color: #007bff; /* Color azul para enlaces de menú */
    --text-dark: #333;
    --text-medium: #555;
    --border-light: #e0e0e0;
    --bg-light: #f8f8f8;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-medium);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}
/* --- Estilos para Botones de Acción de la Tabla --- */

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-right: 5px;
    display: inline-block;
    text-align: center;
    text-decoration: none; /* Para el botón 'Ver' */
}

.view-btn {
    background-color: var(--secondary-color); /* Azul */
    color: white;
}

.view-btn:hover {
    background-color: #0056b3;
}

.delete-btn {
    background-color: #dc3545; /* Rojo de peligro */
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}



.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background-color: #e65c50;
}

.btn-tertiary {
    background-color: #f4f7f6;
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.btn-tertiary:hover {
    background-color: #e0e0e0;
}

/* Header - Top Bar */
.header-top {
    background-color: #fff;
    border-bottom: 1px solid var(--border-light);
    padding: 5px 0;
}

.header-top .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}

.header-top a {
    color: var(--text-medium);
}
.btn-top {
    background-color: var(--primary-color);
    color: #fff;
}

/* Header - Main Bar (Logo and Nav) */
.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    flex-direction: column; 
    align-items: center;
}

.logo-container {
    padding-bottom: 15px;
}

.logo {
    display: block;
    width: 200px; 
    height: auto;
    margin: 0 auto;
}

/* Navigation */
.nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; 
    list-style: none;
    padding: 10px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.nav ul ul {
    display: block;
    padding: 0;
    border: none;
    background: none;
}

.nav li a {
    color: var(--text-dark);
    font-weight: 500;
    text-transform: uppercase;
    padding: 5px 10px;
    font-size: 0.85em;
    display: block;
}

.nav li a.active, .nav li a:hover {
    color: var(--primary-color);
}








.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #000; /* color opcional */
    padding: 10px;
    border-radius: 5px;
    list-style: none;
    margin-top: 5px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    padding: 8px 15px;
    font-size: 0.9em;
    text-transform: none;
    white-space: nowrap;
}

/* Ajuste para que no se rompa el diseño */
.dropdown {
    position: relative;
}
/* Hero Section */
.hero {
    background-color: var(--bg-light);
    padding: 40px 0;
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-image img {
    width: 100%;
    max-width: 400px; 
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hero-content h2 {
    font-size: 2em; 
    line-height: 1.2;
    margin-bottom: 0;
}

.highlight {
    color: var(--primary-color);
}

/* Blog Posts Section (Grid) */
.blog-posts {
    padding: 50px 0;
    background: #fff;
}

.blog-posts h2 {
    text-align: center;
    font-size: 2.2em;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-post {
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-post h3 {
    font-size: 1.5em;
    padding: 10px 0 5px;
}

.blog-post p {
    color: var(--text-medium);
}

.blog-post .read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: bold;
}
/* About Me Section */
.about-me {
    padding: 50px 0;
    border-bottom: 1px solid var(--border-light);
}

.about-me h2 {
    text-align: center;
    text-transform: uppercase;
    font-size: 2.2em;
}

.about-flex {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-text h3 {
    margin-top: 25px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 5px;
}

.about-image img {
    width: 100%;
    height: auto;
    max-width: 450px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* Newsletter Section */
.newsletter {
    background-color: #fff;
    padding: 50px 0;
}

.newsletter-flex {
    display: flex;
    flex-direction: column;
    gap: 40px;
    border: 1px solid var(--border-light);
    padding: 30px;
    border-radius: 8px;
}

.newsletter-info h2 {
    text-align: left;
    text-transform: uppercase;
}

.newsletter-form-container h3 {
    text-align: center;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 10px 15px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 1em;
    font-family: var(--font-body);
}

.newsletter-form .btn-primary {
    width: 100%;
    padding: 12px;
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    padding: 30px 0;
    color: #fff;
    text-align: center;
}

.footer-logo img {
    width: 100px;
    height: auto;
    margin-bottom: 15px;
    filter: invert(100%);
}

.footer-copy p {
    font-size: 0.9em;
    color: var(--border-light);
}

.social-media {
    margin-top: 10px;
}

.social-media a {
    color: #fff;
    font-weight: bold;
    margin: 0 5px;
    font-size: 1.1em;
}

/* --- Login Styles --- */

.login-body {
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-title {
    font-size: 2em;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 1em;
}

.login-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

.forgot-password, .back-link {
    margin-top: 15px;
    font-size: 0.9em;
}

/* --- Dashboard Styles --- */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f4f7f6;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--text-dark);
    color: #fff;
    padding: 30px 20px;
    flex-shrink: 0; 
}

.sidebar h2 {
    color: #fff;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    font-size: 1.5em;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
}

.sidebar nav ul li a {
    display: block;
    color: #c9c9c9;
    padding: 12px 0;
    margin-bottom: 5px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 500;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active-dashboard {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 10px;
    border-radius: 3px;
}

/* Contenido Principal del Dashboard */
.dashboard-content {
    flex-grow: 1; 
    padding: 40px;
}

.dashboard-content h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 10px;
}

.post-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.post-form input[type="text"],
.post-form input[type="url"],
.post-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 1em;
    font-family: var(--font-body);
    margin-top: 5px;
}

.post-form textarea {
    resize: vertical;
}

.post-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* --- Single Post View (post.php) --- */
.single-post {
    padding: 60px 0;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.post-meta {
    color: var(--text-medium);
    font-size: 0.9em;
    margin-bottom: 20px;
}

.featured-image {
    margin-bottom: 40px;
}
.featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.post-content {
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 50px auto; 
}

.post-content p {
    margin-bottom: 20px;
}
.post-content h2, .post-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-dark);
}
.post-content ul, .post-content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.post-footer {
    text-align: center;
    border-top: 1px solid var(--border-light);
    padding-top: 30px;
}
/* ==================================== */
/* === ESTILOS PARA LA SECCIÓN PROPINA (CORREGIDOS) === */
/* ==================================== */

.propina-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.propina-section .main-title {
    color: var(--text-dark);
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 5px;
}

/* El título principal "El tarro de las propinas" debe ser el color principal (anaranjado) */
.propina-section .subtitle {
    color: var(--primary-color); /* Usamos --primary-color (Naranja) */
    font-family: var(--font-heading); /* Aseguramos que use la fuente de encabezado */
    font-size: 3em;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 0;
    margin-bottom: 25px;
}

/* La dedicatoria "Te dedico mi sonrisa más encantadora." */
.propina-section .dedication {
    font-size: 2.5em;
    margin-top: 50px;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color); /* También la ponemos en naranja */
    font-family: var(--font-heading);
}

/* --- Layout del Contenido Principal --- */
.layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.text-column p {
    line-height: 1.7; /* Usamos el line-height general del body */
    margin-bottom: 15px;
}

.image-column img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Estilos de la Selección de Pagos --- */
.payment-selection {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 30px 0;
    border-top: 1px solid var(--border-light);
}

.payment-group {
    flex: 1;
    padding: 20px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.payment-group h3 {
    font-size: 1.1em;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-family: var(--font-body); /* Para que el subtítulo no sea tan formal */
}

/* Títulos de método de pago (MERCADO PAGO / PAYPAL) */
.payment-group h4 {
    font-size: 1.5em;
    color: var(--text-dark); /* Color oscuro principal */
    font-family: var(--font-heading);
    margin-top: 0;
    margin-bottom: 20px;
}

/* --- Botones de Monto (ARS) --- */
.amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-amount {
    display: block;
    padding: 10px 15px;
    /* Usamos el color primario (Naranja) para el borde de los montos ARS */
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s;
    flex-grow: 1;
    min-width: 80px;
    text-transform: uppercase;
}

/* Estado hover y "Otro Monto" */
.btn-amount:hover, .btn-amount.other-amount:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-amount.other-amount {
    border-style: dashed;
    flex-grow: 2;
}


/* --- Opciones de PayPal/Cafecito (USD) --- */
.paypal-options {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.paypal-options select {
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    flex-grow: 1;
    font-size: 1em;
    font-family: var(--font-body);
}

/* Ya está definido .btn-primary globalmente, pero lo reforzamos */
.payment-group .btn-primary {
    padding: 10px 20px;
    text-decoration: none;
    white-space: nowrap; /* Evita que el botón se rompa */
}

.cafecito-option hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid var(--border-light);
}

/* Botón "Comprar un Cafecito" (similar al color gris de PayPal/Otros) */
.cafecito-btn {
    width: 100%;
    background-color: var(--bg-light); /* Fondo claro/gris */
    color: var(--text-dark);
    padding: 12px 0;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    text-transform: uppercase;
}

.cafecito-btn:hover {
    background-color: #e0e0e0;
}

.small-note {
    font-size: 0.8em;
    color: var(--text-medium);
    text-align: center;
    margin-top: 5px;
}

/* --- Media Queries (Responsividad) --- */
@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
    .image-column {
        order: -1;
    }
    .payment-selection {
        flex-direction: column;
    }
    .payment-group {
        flex: none;
        width: 100%;
    }
    .propina-section .dedication {
        font-size: 2em; /* Reducimos un poco el tamaño en móviles */
    }
}


/* --- Responsive Design --- */
@media (min-width: 768px) {
    .nav ul {
        gap: 20px; 
    }

    .hero .container {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }

    .hero-image { order: 1; flex: 1; }
    .hero-content { order: 2; flex: 1; padding-left: 30px; }
    .hero-content h2 { font-size: 3em; }
    
    .about-flex {
        flex-direction: row-reverse; 
        align-items: flex-start;
    }

    .about-text { flex: 2; }
    .about-image { flex: 1; align-self: center; }

    .newsletter-flex {
        flex-direction: row;
        align-items: center;
    }

    .newsletter-info { flex: 2; padding-right: 30px; }
    .newsletter-form-container { flex: 1; min-width: 300px; }

    .footer-copy {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Dashboard Responsive */
    .dashboard-wrapper {
        flex-direction: row;
    }
    .sidebar {
        width: 250px;
    }
    .sidebar nav ul {
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
    }
}
/* Ajuste para la celda de acciones en móviles */
@media (max-width: 768px) {
    .posts-table td:nth-of-type(5) {
        /* Asegura que los botones se apilen bien si hay poco espacio */
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    .action-btn {
        width: 80%; /* Hace que los botones sean más anchos en móviles */
        margin-bottom: 5px;
    }
}

@media (max-width: 767px) {
    /* Dashboard Mobile */
    .dashboard-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        padding: 20px 10px;
    }
    .sidebar h2 {
        text-align: center;
    }
    .sidebar nav ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .dashboard-content {
        padding: 20px;
    }
    .post-actions {
        flex-direction: column;
    }
}