/* css/style.css */
:root {
    --primary: #1a73e8;
    --secondary: #0d47a1;
    --accent: #ff6d00;
    --light: #f5f5f5;
    --dark: #333333;
    --gray: #757575;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary);
    font-size: 1.2rem;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-text span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: var(--accent);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1550745165-9bc0b252726f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    text-align: center;
}

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

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: #e65100;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-whatsapp {
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: var(--light);
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.service-icon {
    height: 150px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.service-content p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-features li {
    padding: 0.3rem 0;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.service-features li:before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Appointment Section */
.appointment {
    padding: 5rem 0;
    background: white;
}

.appointment-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.appointment-form {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

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

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.appointment-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.appointment-info p {
    margin-bottom: 1.5rem;
    color: var(--gray);
}

.info-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.info-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-list li:last-child {
    border-bottom: none;
}

/* Calendar Section */
.calendar-section {
    padding: 5rem 0;
    background: var(--light);
}

#calendar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Ajustes para FullCalendar */
.fc {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.fc-toolbar-title {
    color: var(--primary);
    font-weight: 600;
}

.fc-button {
    background: var(--primary) !important;
    border: none !important;
    transition: background 0.3s !important;
}

.fc-button:hover {
    background: var(--secondary) !important;
}

.fc-daygrid-event {
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.85rem;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    overflow: hidden;
    animation: modalSlideIn 0.3s;
}

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

.modal-header {
    background: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

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

.modal-body {
    padding: 1.5rem;
}

/* Dashboard Styles */
.dashboard {
    padding: 2rem 0;
    min-height: 100vh;
    background: #f5f5f5;
}

.dashboard-header {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.dashboard-header p {
    color: var(--gray);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.citas-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--light);
    font-weight: 600;
    color: var(--primary);
}

.estado {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.estado-pendiente {
    background: #fff3cd;
    color: #856404;
}

.estado-confirmada {
    background: #d1ecf1;
    color: #0c5460;
}

.estado-completada {
    background: #d4edda;
    color: #155724;
}

.estado-cancelada {
    background: #f8d7da;
    color: #721c24;
}

.btn-action {
    padding: 0.3rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-confirm {
    background: var(--success);
    color: white;
}

.btn-complete {
    background: var(--info);
    color: white;
}

.btn-cancel {
    background: var(--danger);
    color: white;
}

.btn-delete {
    background: var(--gray);
    color: white;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .appointment-container {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .appointment-container {
        grid-template-columns: 1fr;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .fc-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .fc-toolbar-chunk {
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .citas-table {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .service-icon {
        height: 120px;
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-action {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Print Styles */
@media print {
    header, footer, .btn, .mobile-menu, .dashboard-header {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    .service-card, .appointment-form, .citas-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Estilos para el Modal de Detalles de Cita */
.event-modal-content {
    max-width: 600px;
}

.event-details-container {
    padding: 0;
}

.event-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 8px 8px 0 0;
}

.event-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.event-title h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.event-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.3rem;
    background: rgba(255,255,255,0.9);
}

.event-info-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1rem;
}

.info-value {
    color: var(--dark);
    font-size: 1rem;
    padding: 0.5rem 0;
    word-break: break-word;
}

#event-message {
    background: var(--light);
    padding: 0.8rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
    min-height: 60px;
    font-style: italic;
}

.event-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

.btn-secondary {
    background: var(--gray);
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Estados de cita en el modal */
.status-pendiente .event-status {
    background: #fff3cd;
    color: #856404;
}

.status-confirmada .event-status {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completada .event-status {
    background: #d4edda;
    color: #155724;
}

.status-cancelada .event-status {
    background: #f8d7da;
    color: #721c24;
}

/* Iconos específicos por servicio */
.service-hosting .event-icon {
    background: rgba(255,255,255,0.2);
}

.service-web .event-icon {
    background: rgba(255,255,255,0.2);
}

.service-mobile .event-icon {
    background: rgba(255,255,255,0.2);
}

.service-cameras .event-icon {
    background: rgba(255,255,255,0.2);
}

.service-cabling .event-icon {
    background: rgba(255,255,255,0.2);
}

/* Responsive para el modal de eventos */
@media (max-width: 768px) {
    .event-modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .event-header {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .event-info-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .event-actions {
        flex-direction: column;
    }
    
    .event-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Animaciones adicionales */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-modal-content {
    animation: slideInUp 0.3s ease-out;
}

/* Efectos hover mejorados */
.info-item:hover .info-label {
    color: var(--secondary);
}

.info-item:hover .info-icon {
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* Estilos para validaciones y mensajes de error */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: slideDown 0.3s ease-out;
}

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

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 4px solid var(--success);
}

.error-icon {
    font-size: 1.2rem;
}

.error-text {
    flex: 1;
}

/* Estilos para campos inválidos */
.form-control:invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.form-control:valid {
    border-color: var(--success);
}

/* Loading spinner mejorado */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Botón deshabilitado */
.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled:hover {
    background: #ccc;
}

/* Mensajes informativos */
.info-message {
    background: #d1ecf1;
    color: #0c5460;
    padding: 0.8rem;
    border-radius: 4px;
    margin: 1rem 0;
    border-left: 4px solid var(--info);
    font-size: 0.9rem;
}

/* Estilos para el calendario de carga */
.loading-calendar {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    font-size: 1.1rem;
}

.loading-calendar:before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Estilos para mensajes de disponibilidad */
.disponibilidad-mensaje {
    margin: 0.5rem 0 1rem 0;
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

.disponibilidad-mensaje.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 4px solid var(--success);
}

.disponibilidad-mensaje.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid var(--danger);
}

.disponibilidad-mensaje.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-left: 4px solid var(--warning);
}

.disponibilidad-mensaje.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-left: 4px solid var(--info);
}

/* Animación para los mensajes */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para el indicador de carga en verificación */
.loading-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Mejoras visuales para el formulario */
.form-group:focus-within label {
    color: var(--primary);
    font-weight: 600;
}

.form-group:focus-within .form-control {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

/* Estilos para horarios no disponibles */
.time-slot-unavailable {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    cursor: not-allowed !important;
}

.time-slot-available {
    background-color: #d4edda !important;
    color: #155724 !important;
}

/* Estilos para el checkbox de privacidad */
.privacy-checkbox {
    margin: 1.5rem 0;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.2rem;
    transform: scale(1.2);
    accent-color: var(--primary);
}

.checkbox-group label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--dark);
    flex: 1;
}

.checkbox-group a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

.checkbox-group.required label::after {
    content: " *";
    color: var(--danger);
}

/* Estilos para mensajes de error de consentimiento */
.alert-consent {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-left: 4px solid var(--warning);
}