/* assets/css/styles.css */

/* ============================================
   CSS VARIABLES & ROOT
   ============================================ */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #cfe2ff;
    --secondary: #6c757d;
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --box-shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--gray-900);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 800;
}

.lead {
    font-weight: 400;
    font-size: 1.25rem;
    color: var(--gray-600);
}

.text-primary {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--gray-600) !important;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    color: var(--primary);
    margin-right: 8px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
    color: var(--gray-700) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

.nav-link i {
    margin-right: 6px;
}

.navbar .btn-primary {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.navbar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(13, 110, 253, 0.4);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-weight: 600;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.35);
    color: var(--white);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.25);
    color: var(--white);
}

.btn-lg {
    padding: 0.9rem 2.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 1.2rem;
    font-size: 0.875rem;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    background: #157347;
    border-color: #146c43;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: var(--dark);
}

.btn-warning:hover {
    background: #ffca2c;
    border-color: #ffc720;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #bb2d3b;
    border-color: #b02a37;
    transform: translateY(-2px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    padding: 4rem 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-section h1 .text-primary {
    position: relative;
}

.hero-section h1 .text-primary::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(13, 110, 253, 0.2);
    border-radius: 4px;
}

.hero-section .lead {
    font-size: 1.3rem;
    max-width: 90%;
    color: var(--gray-600);
}

.hero-section .btn {
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.25);
}

.hero-section .btn-outline-primary {
    box-shadow: none;
}

.hero-section img {
    border-radius: 20px;
    object-fit: cover;
    width: 100%;
    height: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    transition: var(--transition);
}

.hero-section img:hover {
    transform: scale(1.01);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 5rem 0;
}

section:nth-child(even) {
    background-color: var(--gray-100);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--gray-600);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border-radius: var(--border-radius);
    border: none;
    overflow: hidden;
    transition: var(--transition);
    background: var(--white);
}

.hover-shadow:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover) !important;
}

.transition {
    transition: var(--transition);
}

.card .card-body {
    padding: 1.5rem;
}

/* ============================================
   ICON CIRCLES
   ============================================ */
.icon-circle {
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-circle:hover {
    transform: scale(1.1);
}

.icon-circle.bg-primary-light {
    background: rgba(13, 110, 253, 0.1);
}

.icon-circle.bg-success-light {
    background: rgba(25, 135, 84, 0.1);
}

.icon-circle.bg-warning-light {
    background: rgba(255, 193, 7, 0.1);
}

.icon-circle.bg-danger-light {
    background: rgba(220, 53, 69, 0.1);
}

.icon-circle.bg-info-light {
    background: rgba(13, 202, 240, 0.1);
}

.icon-circle i {
    font-size: 1.8rem;
}

/* ============================================
   DOCTOR CARDS
   ============================================ */
.doctor-photo {
    position: relative;
    display: inline-block;
}

.doctor-photo img {
    border: 4px solid var(--gray-200);
    transition: var(--transition);
    border-radius: 50%;
}

.doctor-photo img:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.doctor-card .card {
    text-align: center;
    padding: 1rem;
}

.doctor-card .card .rating {
    margin: 0.5rem 0;
}

.doctor-card .card .btn {
    border-radius: 50px;
}

/* ============================================
   RATING STARS
   ============================================ */
.rating .fas.fa-star,
.rating .far.fa-star {
    font-size: 1rem;
    margin-right: 2px;
}

.rating .fas.fa-star {
    color: var(--warning);
}

.rating .far.fa-star {
    color: var(--gray-400);
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials .card {
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
}

.testimonials .card .card-body {
    padding: 1.5rem;
}

.testimonials .card .rating {
    margin-bottom: 0.5rem;
}

.testimonials .card p {
    font-style: italic;
    color: var(--gray-700);
}

/* ============================================
   FORMS
   ============================================ */
.form-control {
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-select {
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   APPOINTMENT FORM
   ============================================ */
.appointment-form {
    background: var(--gray-100);
    padding: 2.5rem;
    border-radius: var(--border-radius);
}

.appointment-form .form-control,
.appointment-form .form-select {
    background: var(--white);
}

/* ============================================
   MAP
   ============================================ */
#map {
    border-radius: var(--border-radius);
    width: 100%;
    height: 500px;
}

.map-container {
    position: relative;
}

.map-container .map-overlay {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: var(--box-shadow);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 0;
}

.footer h5 {
    color: var(--white);
    font-weight: 700;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary) !important;
}

.footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transition: var(--transition);
    margin-right: 8px;
}

.footer .social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

/* ============================================
   RECEIPT
   ============================================ */
.receipt {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    max-width: 800px;
    margin: 0 auto;
}

.receipt-header {
    border-bottom: 3px solid var(--primary);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.receipt-number {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ============================================
   TABLE
   ============================================ */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--gray-700);
    border-top: none;
    padding: 0.75rem 1rem;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--gray-100);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.04);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.75rem;
}

.badge.bg-warning {
    color: var(--dark);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
}

.alert-warning {
    background: #fff3cd;
    color: #664d03;
}

.alert-info {
    background: #cff4fc;
    color: #055160;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.3);
}

#scrollToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(13, 110, 253, 0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   MODAL
   ============================================ */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow-hover);
}

.modal-header {
    border-bottom: 2px solid var(--gray-200);
    padding: 1.5rem 1.5rem 1rem;
}

.modal-footer {
    border-top: 2px solid var(--gray-200);
    padding: 1rem 1.5rem 1.5rem;
}

.modal-title {
    font-weight: 700;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .hero-section h1 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    section {
        padding: 3.5rem 0;
    }
    
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.8rem;
    }
    
    .hero-section .lead {
        max-width: 100%;
        font-size: 1.1rem;
    }
    
    .hero-section img {
        height: 350px;
        margin-top: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .navbar .btn-primary {
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 2.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-section .btn-lg {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .hero-section img {
        height: 250px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .social-links {
        justify-content: center;
    }
    
    #map {
        height: 300px;
    }
    
    .appointment-form {
        padding: 1.5rem;
    }
    
    .receipt {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .hero-section .d-flex {
        flex-direction: column;
    }
    
    .hero-section .d-flex .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .card .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .receipt {
        box-shadow: none !important;
        border: 1px solid var(--gray-300);
        padding: 1.5rem;
    }
    
    body {
        background: var(--white);
        font-size: 12px;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid var(--gray-300);
        box-shadow: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 1rem 0;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.min-vh-75 {
    min-height: 75vh;
}

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shadow-hover {
    transition: var(--transition);
}

.shadow-hover:hover {
    box-shadow: var(--box-shadow-hover) !important;
}

.rounded-4 {
    border-radius: 20px;
}

.rounded-5 {
    border-radius: 30px;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.transition {
    transition: var(--transition);
}

.z-index-1 {
    z-index: 1;
}

.z-index-10 {
    z-index: 10;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}