/**
 * Custom Styles for Family Dental Clinic
 * Premium Medical Design - Teal & Deep Navy
 */

/* === ROOT VARIABLES === */
:root {
    --primary-color: #00bcb0;
    /* Vibrant Teal */
    --primary-dark: #009e94;
    --secondary-color: #1e2a4a;
    /* Deep Navy */
    --accent-color: #ff6b6b;
    /* Soft Coral for CTAs */
    --text-dark: #2d3748;
    --text-muted: #718096;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === CUSTOM ANIMATIONS === */
@keyframes float {
    0% {
        transform: translateY(0px) perspective(1000px) rotateY(-5deg);
    }

    50% {
        transform: translateY(-15px) perspective(1000px) rotateY(-5deg);
    }

    100% {
        transform: translateY(0px) perspective(1000px) rotateY(-5deg);
    }
}

@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        left: 200%;
        opacity: 0;
    }
}

@keyframes toothWiggle {

    0%,
    90% {
        transform: rotate(0deg);
    }

    92% {
        transform: rotate(-15deg);
    }

    94% {
        transform: rotate(15deg);
    }

    96% {
        transform: rotate(-10deg);
    }

    98% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 188, 176, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 188, 176, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 188, 176, 0);
    }
}

/* === GLOBAL STYLES === */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--secondary-color);
    font-weight: 700;
}

a {
    transition: var(--transition);
    text-decoration: none;
}

/* === NAVBAR === */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--secondary-color) !important;
}

.navbar-brand i {
    color: var(--primary-color) !important;
    animation: toothWiggle 3s infinite ease-in-out;
    display: inline-block;
}

.nav-link {
    color: var(--secondary-color) !important;
    font-weight: 500;
    margin: 0 5px;
    padding: 8px 16px !important;
    border-radius: 50px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(0, 188, 176, 0.08);
    /* Light Teal tint */
}

/* === BACKGROUNDS === */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #151e32 100%) !important;
}

/* === HERO SECTION === */
.hero-section {
    position: relative;
    padding: 120px 0 100px;
    background: linear-gradient(135deg, #f7fafc 0%, #e6fffa 100%);
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 188, 176, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-section img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
    animation: float 6s ease-in-out infinite;
}

.hero-section img:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* === BUTTONS === */
.btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00a89c 100%);
    box-shadow: 0 4px 15px rgba(0, 188, 176, 0.3);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 188, 176, 0.4);
    background: linear-gradient(135deg, #00a89c 0%, var(--primary-color) 100%);
    color: var(--white);
}

.btn-light {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--secondary-color);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* === CARDS & SERVICES === */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.card {
    border: none;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
}

.service-card {
    padding: 40px 30px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.service-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: rgba(0, 188, 176, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    color: var(--white);
    transform: rotateY(360deg) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 188, 176, 0.4);
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* === FOOTER === */
footer {
    background: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

footer h5 {
    color: var(--white);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
    display: inline-block;
    margin-bottom: 25px;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
}

footer a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* === ADMIN DASHBOARD === */
.admin-sidebar {
    background: #1a202c;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card {
    border-radius: var(--radius-md);
    border: none;
    border-left: 4px solid var(--primary-color);
}

.stat-icon {
    color: var(--primary-color);
    opacity: 0.8;
}

/* === RESPONSIVE === */
@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-section {
        min-height: auto;
        padding-top: 140px;
        padding-bottom: 60px;
        text-align: center;
    }

    .hero-section img {
        margin-top: 50px;
        transform: none;
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-icon {
        width: 70px;
        height: 70px;
        line-height: 70px;
        font-size: 1.75rem;
    }

    .btn {
        width: 100%;
        margin: 5px 0;
        display: block;
    }

    .hero-content .btn {
        margin-right: 0 !important;
    }

    /* Ensure cards don't touch edges */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Admin panel mobile fixes */
    .table-responsive {
        font-size: 0.85rem;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 1rem;
    }

    .table tbody td {
        display: block;
        text-align: left !important;
        padding: 0.5rem 0 !important;
        border: none !important;
    }

    .table tbody td:before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        margin-right: 10px;
        color: var(--secondary-color);
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .admin-header h2 {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* === BUTTON FIXES & HOVER EFFECTS === */

/* Booking Page Submit Button */
.custom-hover-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.custom-hover-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 188, 176, 0.3) !important;
}

/* Homepage Our Services Button Hover */
.hero-content .btn-outline-primary {
    background-color: transparent;
    /* Default state */
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.hero-content .btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 10px 20px rgba(0, 188, 176, 0.2);
    transform: translateY(-2px);
}

.hero-content .btn-light {
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-content .btn-light:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 188, 176, 0.2);
    transform: translateY(-2px);
}