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

:root {
    --primary: #2a6fdb;
    --primary-dark: #1e5bbd;
    --secondary: #eef4ff;
    --accent: #00d2ff;
    --text: #333;
    --text-muted: #666;
    --bg: #ffffff;
    --bg-alt: #f8faff;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

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

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-cta {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
}

.btn-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #1a2a4e;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-image img {
    width: 90%;
    max-width: 600px;
    border-radius: 30px;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Sections */
section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #1a2a4e;
    margin-bottom: 1rem;
}

.section-title .underline {
    width: 50px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--bg-alt);
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: var(--transition);
    text-align: center;
    border: 1px solid transparent;
}

.service-card:hover {
    background: var(--white);
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Benefits */
.benefits-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.benefit-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Forms */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

form {
    background: var(--bg-alt);
    padding: 3rem;
    border-radius: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(42, 111, 219, 0.1);
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Footer */
footer {
    background: #1a2a4e;
    color: var(--white);
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #a0aec0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px);
    transition: var(--transition);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary);
}

/* Time Slots */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.slot-btn {
    padding: 0.8rem;
    border: 2px solid var(--secondary);
    border-radius: 12px;
    background: var(--bg-alt);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 600;
}

.slot-btn:hover:not(.disabled) {
    border-color: var(--primary);
    background: var(--secondary);
}

.slot-btn.selected {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.slot-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #eee;
}

/* Responsive */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        padding-top: 120px;
        text-align: center;
        height: auto;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
    }

    .benefits-container,
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* ADMIN LAYOUT & SIDEBAR */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #1a2a4e;
    color: white;
    padding: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: block;
    color: white;
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 1.5rem;
}

.sidebar-menu a {
    color: #a0aec0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: white;
}

.sidebar-menu a.active i {
    color: var(--accent);
}

.main-content {
    padding: 3rem;
    background: var(--bg-alt);
    min-height: 100vh;
}

/* Dashboard Fixes */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
}

.table-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.action-icon {
    font-size: 1.2rem;
    color: var(--primary);
    margin-right: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.action-icon:hover {
    color: var(--accent);
    transform: scale(1.2);
}

/* Appointment Page (solicitar_turno.php) */
.appointment-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    padding: 120px 5% 50px;
}

.appointment-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.professional-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--secondary);
}

.professional-header h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.professional-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.field-with-icon {
    position: relative;
}

.validation-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.validation-icon.success {
    color: #28a745;
}

.validation-icon.error {
    color: #dc3545;
}

.validation-icon.loading {
    color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: translateY(-50%) rotate(360deg); }
}

.conditional-field {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.conditional-field.show {
    max-height: 200px;
}

.pami-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    display: none;
}

.pami-warning.show {
    display: block;
}

.pami-warning i {
    color: #ffc107;
    margin-right: 0.5rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.back-link:hover {
    transform: translateX(-5px);
}

.form-group input[readonly],
.form-group select[disabled] {
    background: #f5f5f5;
    cursor: not-allowed;
}