/* 
   assets/css/style.css
   Estilos principales para Peluquería Canina S&B
   Diseño serio, tecnológico, minimalista y premium.
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    --primary-color: #8b0000; /* Rojo corporativo */
    --primary-color-hover: #6a0000;
    --background-color: #fdfbfb; /* Crema muy suave */
    --text-color: #333333; /* Antracita */
    --text-light: #666666;
    --white: #ffffff;
    --border-color: #eaeaea;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-font {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

/* Header & Hamburger Nav */
.main-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.logo-container img {
    height: 50px; 
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.logo-container img:hover {
    opacity: 0.9;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
}

nav#main-nav {
    display: flex;
}

nav#main-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

nav#main-nav a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

nav#main-nav a:hover {
    opacity: 1;
}

/* Menú compacto también en ventanas de escritorio estrechas. */
@media (max-width: 1600px) {
    .hamburger-menu {
        display: flex;
    }
    
    nav#main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        display: none;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    nav#main-nav.open {
        display: flex;
        animation: fadeIn 0.3s ease forwards;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    nav#main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav#main-nav li {
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    nav#main-nav a {
        display: block;
        padding: 1.2rem 2rem;
    }
}

main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Stories section */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.story-card {
    background-color: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.story-image {
    width: 100%;
    height: 220px;
    background-color: transparent;
    object-fit: contain;
    display: block;
}

.story-image-placeholder {
    width: 100%;
    height: 220px;
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 1px;
}

.story-content {
    padding: 1.5rem;
}

.story-title {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.story-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Button styles */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--primary-color-hover);
}

.btn:active {
    transform: scale(0.98);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: #fafafa;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

footer {
    background-color: #111;
    color: #888;
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
    font-size: 0.9rem;
}

/* Calendar specifics */
.calendar-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 3rem;
}
.calendar-view {
    flex: 1;
    min-width: 320px;
}
.booking-form {
    flex: 1;
    min-width: 320px;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

#calendar {
    background: var(--white);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.calendar-header h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 600;
}

.calendar-header button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header button:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.calendar-day-name {
    font-weight: 500;
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    padding: 0.8rem 0;
    background: #fafafa;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.calendar-day:hover:not(.empty) {
    background: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.calendar-day.full {
    background: #ffeded;
    color: #e74c3c;
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.7;
}

.calendar-day.full:hover {
    background: #ffeded;
    color: #e74c3c;
    transform: none;
    border-color: transparent;
}

.calendar-day.partial {
    background: #e8f4f8; /* Azul claro / sutil */
    color: var(--text-color);
    border: 1px solid #bce0f0;
}

/* Admin specific styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    color: var(--text-color);
}

.admin-table tr:hover {
    background-color: #fafafa;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-pendiente { background: #fff3cd; color: #856404; }
.badge-verificada { background: #d4edda; color: #155724; }
.badge-completada { background: #cce5ff; color: #004085; }
.badge-cancelada { background: #f8d7da; color: #721c24; }

.action-links a {
    margin-right: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.action-links a:hover {
    text-decoration: underline;
}

/* --- NEW SECTIONS (REDESIGN) --- */

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1.5rem;
    background-color: #9e0e0e; /* Color corporativo un poco más claro que #8b0000 */
    border-bottom: 1px solid var(--border-color);
}
.hero h1 {
    font-size: 3.5rem;
    color: var(--white); /* Cambiado a blanco para contrastar */
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}
.hero .hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-style: italic;
    color: #ffd700; /* Dorado sutil para contrastar con el fondo rojo */
    margin-bottom: 1.5rem;
}
.hero .hero-desc {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    color: var(--white); /* Cambiado a blanco para contrastar */
}
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.hero .btn:not(.btn-whatsapp) {
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: 600;
}
.hero .btn:not(.btn-whatsapp):hover {
    background-color: #f0f0f0;
}

.btn-whatsapp {
    background-color: #25D366;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-whatsapp:hover {
    background-color: #1ebd5a;
}

/* Common Section Styles */
.section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.section-bg {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.service-card {
    background: var(--white);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    transition: transform 0.3s;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Philosophy */
.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.price-card {
    background: var(--white);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.price-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}
.price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed var(--border-color);
}
.price-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 1.5rem;
    font-style: italic;
}

/* About / Conóceme */
.about-flex {
    display: flex;
    gap: 4rem;
    align-items: center;
    flex-wrap: wrap;
}
.about-img {
    flex: 1;
    min-width: 300px;
    height: 400px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border-radius: 4px;
}
.about-text {
    flex: 1;
    min-width: 300px;
}
.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Custom Footer */
.main-footer {
    background-color: #222;
    color: #ccc;
    padding: 4rem 1.5rem 2rem 1.5rem;
}
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-col h4 {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}
.footer-col p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.footer-col a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-col a:hover {
    color: var(--white);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    font-size: 0.85rem;
}

/* --- RESPONSIVE MOBILE FIXES --- */
@media (max-width: 768px) {
    .section {
        padding: 3rem 1rem;
    }
    .hero {
        padding: 3rem 1rem;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero .hero-subtitle {
        font-size: 1.4rem;
    }
    .hero img {
        width: 100% !important;
        max-width: 320px !important;
    }
    .about-flex {
        gap: 2rem;
        flex-direction: column;
    }
    .about-img, .about-text {
        width: 100%;
        min-width: 100%;
    }
    .pricing-grid, .services-grid, .stories-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Admin panels responsive */
    .admin-table, table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent the entire page from breaking horizontally */
    body {
        overflow-x: hidden;
        width: 100vw;
    }
}

/* Cabecera: impedir que los enlaces se partan o se superpongan. */
.main-header { gap: 1.25rem; }
.main-header .logo-container { flex-shrink: 0; }
.main-header .hamburger-menu { flex-shrink: 0; }
nav#main-nav ul { align-items: center; }
nav#main-nav li { flex-shrink: 0; }
nav#main-nav a { white-space: nowrap; }
@media (max-width: 1600px) {
    nav#main-nav {
        max-height: calc(100vh - 80px);
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    nav#main-nav ul { width: 100%; align-items: stretch; }
    nav#main-nav a { white-space: normal; overflow-wrap: anywhere; }
}
