/**
 * Custom CSS for Doctors Hyderabad Theme
 *
 * @package Doctors_Hyderabad
 */

/* Additional custom styles can be added here */

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-inner {
    text-align: center;
}

.preloader-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    position: relative;
}

.preloader-icon span {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    opacity: 0.6;
    animation: preloader-bounce 2s infinite ease-in-out;
}

.preloader-icon span:last-child {
    animation-delay: -1s;
}

@keyframes preloader-bounce {
    0%, 100% {
        transform: scale(0);
    }
    50% {
        transform: scale(1);
    }
}

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #06b6d4;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 9998;
}

.cookie-notice.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.cookie-policy {
    color: #06b6d4;
    text-decoration: none;
}

.cookie-policy:hover {
    text-decoration: underline;
}

/* Age Verification */
.age-verification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.age-verification.show {
    opacity: 1;
    visibility: visible;
}

.age-content {
    background: #1e293b;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
}

.age-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

/* Newsletter Popup */
.newsletter-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.newsletter-popup.show {
    opacity: 1;
    visibility: visible;
}

.newsletter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}

.newsletter-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    margin: 20px;
    position: relative;
    text-align: center;
}

.newsletter-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.newsletter-form-popup {
    margin: 20px 0;
}

.newsletter-form-popup input[type="email"] {
    width: 70%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
}

.newsletter-form-popup button {
    width: 30%;
    padding: 12px;
    border: none;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form-popup button:hover {
    transform: translateY(-2px);
}

/* Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    z-index: 9997;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.install-prompt.show {
    transform: translateY(0);
    opacity: 1;
}

.install-content h4 {
    margin: 0 0 10px 0;
    color: #1e293b;
}

.install-content p {
    margin: 0 0 15px 0;
    color: #64748b;
    font-size: 14px;
}

.install-content .button {
    margin-right: 10px;
}

/* Floating Action Button */
.fab-menu {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(6, 182, 212, 0.4);
}

.fab-items {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fab-menu.active .fab-items {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #1e293b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.fab-item:hover {
    background: #06b6d4;
    transform: scale(1.1);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    z-index: 9999;
    width: 0%;
    transition: width 0.3s ease;
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    z-index: 9998;
    width: 0%;
    transition: width 0.3s ease;
}

/* Dark Mode */
body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #f8fafc;
}

body.dark-mode p,
body.dark-mode li {
    color: #cbd5e1;
}

body.dark-mode .site-header {
    background: #0f172a;
}

body.dark-mode .main-content,
body.dark-mode .sidebar {
    background: #1e293b;
}

body.dark-mode .post-card,
body.dark-mode .doctor-card,
body.dark-mode .speciality-card {
    background: #1e293b;
    border-color: #334155;
}

/* High Contrast Mode */
body.high-contrast {
    background: white;
    color: black;
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6 {
    color: black;
}

body.high-contrast a {
    color: #0066cc;
}

body.high-contrast .btn-primary,
body.high-contrast .hero-button,
body.high-contrast .form-submit {
    background: #0066cc;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .age-actions {
        flex-direction: column;
    }
    
    .newsletter-form-popup input[type="email"],
    .newsletter-form-popup button {
        width: 100%;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .fab-menu {
        bottom: 10px;
        right: 10px;
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .fab-item {
        width: 40px;
        height: 40px;
    }
}

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.sr-only {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
}

/* Form Messages */
.form-message .alert {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.form-message .alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-message .alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Accessibility */
:focus {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* Doctor Header Link */
.doctor-header-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.doctor-header-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(6, 182, 212, 0.4);
    color: white;
}

@media (max-width: 768px) {
    .doctor-header-link span {
        display: none;
    }
    .doctor-header-link {
        padding: 0.6rem;
    }
}

/* Print Styles */
@media print {
    .preloader,
    .cookie-notice,
    .age-verification,
    .newsletter-popup,
    .install-prompt,
    .fab-menu,
    .progress-bar,
    .reading-progress {
        display: none !important;
    }
}