/* Theme Switcher Styles - Comprehensive Coverage */
:root {
    /* Default Theme (Blue) */
    --primary-color: #4A90E2;
    --primary-light: #6BA3E8;
    --primary-dark: #357ABD;
    --primary-rgb: 74, 144, 226;
}

/* Blue Theme */
[data-theme="blue"] {
    --primary-color: #4A90E2;
    --primary-light: #6BA3E8;
    --primary-dark: #357ABD;
    --primary-rgb: 74, 144, 226;
}

/* Orange Theme */
[data-theme="orange"] {
    --primary-color: #FFBD39;
    --primary-light: #ffcd5d;
    --primary-dark: #FFA500;
    --primary-rgb: 255, 189, 57;
}

/* Green Theme */
[data-theme="green"] {
    --primary-color: #2ECC71;
    --primary-light: #52D98A;
    --primary-dark: #27AE60;
    --primary-rgb: 46, 204, 113;
}

/* Purple Theme */
[data-theme="purple"] {
    --primary-color: #9B59B6;
    --primary-light: #AF7AC5;
    --primary-dark: #8E44AD;
    --primary-rgb: 155, 89, 182;
}

/* Red Theme */
[data-theme="red"] {
    --primary-color: #E74C3C;
    --primary-light: #EC7063;
    --primary-dark: #C0392B;
    --primary-rgb: 231, 76, 60;
}

/* Pink Theme */
[data-theme="pink"] {
    --primary-color: #FF69B4;
    --primary-light: #FF8DC7;
    --primary-dark: #FF1493;
    --primary-rgb: 255, 105, 180;
}

/* Theme Switcher Button Container */
.theme-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.theme-switcher:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.theme-switcher-label {
    color: #fff;
    font-size: 0.75rem;
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.theme-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.theme-btn.active {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.theme-btn.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.theme-btn[data-theme="orange"] {
    background: linear-gradient(135deg, #FFBD39, #FFA500);
}

.theme-btn[data-theme="blue"] {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
}

.theme-btn[data-theme="green"] {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
}

.theme-btn[data-theme="purple"] {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
}

.theme-btn[data-theme="red"] {
    background: linear-gradient(135deg, #E74C3C, #C0392B);
}

.theme-btn[data-theme="pink"] {
    background: linear-gradient(135deg, #FF69B4, #FF1493);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .theme-switcher {
        top: 70px;
        right: 10px;
        padding: 10px;
    }

    .theme-btn {
        width: 35px;
        height: 35px;
    }

    .theme-switcher-label {
        font-size: 0.65rem;
        margin-bottom: 8px;
    }
}

/* ========================================
   COMPREHENSIVE THEME APPLICATION
   ======================================== */

/* Hero Title */
.hero-title {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light)) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

/* Text Colors */
.subheading,
.highlight,
.ftco-navbar-light .navbar-nav>.nav-item.active>a,
.ftco-navbar-light .navbar-nav>.nav-item:hover>a,
.ftco-section .heading-section .subheading,
.ftco-section .heading-section h2:after,
.resume-wrap .date,
.ftco-footer-social li a:hover,
.contact-section .box .icon span:before,
.number,
.ftco-hireme h2 span {
    color: var(--primary-color) !important;
}

/* Service Cards */
.services-1.project-card .icon,
.services-1.project-card:hover .desc h3,
.services-1 .icon {
    color: var(--primary-color) !important;
}

.services-1.project-card::before {
    background: linear-gradient(45deg,
            rgba(var(--primary-rgb), 0.15),
            rgba(var(--primary-rgb), 0.15)) !important;
}

.services-1.project-card:hover {
    border-color: rgba(var(--primary-rgb), 0.3) !important;
}

/* Buttons */
.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-white:hover {
    border-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
}

/* Gradient Background */
.gradient-bg {
    background: linear-gradient(45deg,
            rgba(var(--primary-rgb), 0.05),
            rgba(var(--primary-rgb), 0.03),
            rgba(var(--primary-rgb), 0.05)) !important;
}

.hero {
    background: linear-gradient(45deg, rgba(var(--primary-rgb), 0.05), rgba(0, 0, 0, 0.02)) !important;
}

/* Hero and About Images */
.hero-img,
.about-img {
    background: linear-gradient(45deg,
            rgba(var(--primary-rgb), 0.1),
            rgba(var(--primary-rgb), 0.1)) !important;
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2),
        inset 0 0 20px rgba(var(--primary-rgb), 0.1) !important;
}

.hero-img::before,
.about-img::before {
    background: linear-gradient(45deg,
            rgba(var(--primary-rgb), 0.2),
            rgba(var(--primary-rgb), 0.2)) !important;
}

/* Floating Shapes */
.shape {
    background: linear-gradient(45deg,
            rgba(var(--primary-rgb), 0.05),
            rgba(var(--primary-rgb), 0.03)) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.03) !important;
}

/* Projects */
.modern-project-card:hover {
    border-color: rgba(var(--primary-rgb), 0.3) !important;
}

.project-image {
    background: linear-gradient(45deg,
            rgba(var(--primary-rgb), 0.1),
            rgba(var(--primary-rgb), 0.1)) !important;
}

.project-image .fallback-content {
    background: linear-gradient(45deg,
            rgba(var(--primary-rgb), 0.1),
            rgba(var(--primary-rgb), 0.1)) !important;
    color: rgba(var(--primary-rgb), 0.5) !important;
}

.tech-badge {
    background: rgba(var(--primary-rgb), 0.2) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.3) !important;
    color: var(--primary-color) !important;
}

/* Hero Tags */
.hero-tags .tag {
    background: rgba(var(--primary-rgb), 0.15) !important;
    border: 1px solid rgba(var(--primary-rgb), 0.3) !important;
    color: var(--primary-color) !important;
}

.hero-tags .tag:hover {
    background: rgba(var(--primary-rgb), 0.25) !important;
}

/* Filter Buttons */
.btn-filter::after {
    background: var(--primary-color) !important;
}

.btn-filter:hover,
.btn-filter.active {
    color: var(--primary-color) !important;
}

/* Default Avatar */
.default-avatar {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light)) !important;
}

/* Progress Bars */
.progress-bar.color-1,
.progress-bar.color-2,
.progress-bar.color-3,
.progress-bar.color-4,
.progress-bar.color-5,
.progress-bar.color-6,
.progress-bar {
    background: var(--primary-color) !important;
}

/* Links */
a:hover,
a:focus,
.ftco-footer a:hover {
    color: var(--primary-color) !important;
}

/* Navigation */
.ftco-navbar-light .navbar-nav>.nav-item>a:hover {
    color: var(--primary-color) !important;
}

.ftco-navbar-light .navbar-brand {
    color: var(--primary-color) !important;
}

/* Counter/Number Animation */
.counter-wrap .number {
    color: var(--primary-color) !important;
}

/* Resume Section */
.resume-wrap {
    border-left: 2px solid rgba(var(--primary-rgb), 0.2) !important;
}

.resume-wrap .date {
    background: rgba(var(--primary-rgb), 0.1) !important;
    color: var(--primary-color) !important;
}

/* Contact Section */
.contact-section .box {
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
}

.contact-section .box:hover {
    border-color: rgba(var(--primary-rgb), 0.3) !important;
    box-shadow: 0 5px 20px rgba(var(--primary-rgb), 0.1) !important;
}

.contact-section .icon {
    color: var(--primary-color) !important;
}

/* Footer */
.ftco-footer-social li a {
    border: 1px solid rgba(var(--primary-rgb), 0.2) !important;
}

.ftco-footer-social li a:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Heading Sections */
.heading-section .big {
    color: rgba(var(--primary-rgb), 0.05) !important;
}

.heading-section h2:after {
    background: var(--primary-color) !important;
}

/* Borders */
.ftco-section,
.services-1,
.resume-wrap,
.box {
    border-color: rgba(var(--primary-rgb), 0.1) !important;
}

/* Shadows with Theme Color */
.btn-primary:focus,
.btn-primary.focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.5) !important;
}

.modern-project-card:hover,
.services-1.project-card:hover {
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.15) !important;
}

/* Navbar Active State */
.ftco-navbar-light .navbar-nav>.nav-item.active>a {
    color: var(--primary-color) !important;
}

/* Scrollbar */
::-webkit-scrollbar-thumb {
    background: var(--primary-dark) !important;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color) !important;
}

html {
    scrollbar-color: var(--primary-dark) #f1f1f1 !important;
}

/* Form Elements */
.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25) !important;
}

/* Hire Me Section */
.ftco-hireme {
    position: relative;
}

.ftco-hireme h2 span {
    color: var(--primary-color) !important;
}

/* Additional Link States */
.ftco-footer .ftco-footer-widget h2 {
    color: #fff !important;
}

.ftco-footer .list-unstyled li a:hover {
    color: var(--primary-color) !important;
}

.ftco-footer .list-unstyled li a:hover .icon-long-arrow-right {
    color: var(--primary-color) !important;
}

/* About Info List */
.about-info li span:first-child {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Animate on Scroll Elements */
.ftco-animate {
    transition: all 0.3s ease !important;
}

/* Owl Carousel Dots */
.owl-carousel .owl-dot.active span,
.owl-carousel .owl-dot:hover span {
    background: var(--primary-color) !important;
}

/* Additional Hover States */
.project-card:hover,
.services-1:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.2) !important;
}

/* Icon Colors */
.icon-code,
.flaticon-web-design,
.flaticon-analysis,
.flaticon-ideas {
    color: var(--primary-color) !important;
}

/* Big Background Text */
.big,
.big-2 {
    color: rgba(var(--primary-rgb), 0.05) !important;
}

/* Ensure smooth transitions for all themed elements */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Prevent transition on page load */
.preload * {
    transition: none !important;
}

/* ========================================
   ADDITIONAL FIXES FOR SPECIFIC ELEMENTS
   ======================================== */

/* Download CV Buttons - All instances */
a[href*="portfolio.pdf"],
a[href*="cv"],
a[href*="CV"],
.btn-primary[href*="firebasestorage"] {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    color: #fff !important;
}

a[href*="portfolio.pdf"]:hover,
a[href*="cv"]:hover,
a[href*="CV"]:hover,
.btn-primary[href*="firebasestorage"]:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* Navigation Tab Active Styles */
.ftco-navbar-light .navbar-nav>.nav-item.active>a,
.ftco-navbar-light .navbar-nav>.nav-item.active>a:focus,
.ftco-navbar-light .navbar-nav>.nav-item.active>a:hover {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

.ftco-navbar-light .navbar-nav>.nav-item>a:hover,
.ftco-navbar-light .navbar-nav>.nav-item>a:focus {
    color: var(--primary-color) !important;
}

/* Hire Me Button - All instances */
a[href="#contact-section"].btn,
a[href="#contact-section"].btn-primary {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    color: #fff !important;
}

a[href="#contact-section"].btn:hover,
a[href="#contact-section"].btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* Service Card Title Underline */
.services-1 .desc h3::after,
.services-1.project-card .desc h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--primary-color) !important;
    margin: 10px auto 0;
    transition: width 0.3s ease;
}

.services-1:hover .desc h3::after,
.services-1.project-card:hover .desc h3::after {
    width: 80px;
}

/* Open Contact Form Button */
a[href*="typeform"],
a[href*="form.typeform"] {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    color: #fff !important;
}

a[href*="typeform"]:hover,
a[href*="form.typeform"]:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* All Primary Buttons - Comprehensive Coverage */
.btn-primary,
.btn.btn-primary,
a.btn-primary,
button.btn-primary {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
.btn-primary:focus,
.btn.btn-primary:focus,
a.btn-primary:focus,
button.btn-primary:focus {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: #fff !important;
}

/* Section Heading Underlines */
.heading-section h2::after,
.ftco-section .heading-section h2::after {
    background: var(--primary-color) !important;
}

/* Contact Section Specific */
.contact-section .btn-primary {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
}

.contact-section .btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* Resume Section Buttons */
.resume-section .btn-primary,
#resume-section .btn-primary {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
}

.resume-section .btn-primary:hover,
#resume-section .btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* About Section Buttons */
.ftco-about .btn-primary,
#about-section .btn-primary {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
}

.ftco-about .btn-primary:hover,
#about-section .btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* Ensure all links with btn-primary class are covered */
a.btn.btn-primary[target="_blank"] {
    background: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
}

a.btn.btn-primary[target="_blank"]:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

/* Navigation underline on scroll */
.ftco-navbar-light.scrolled .navbar-nav>.nav-item.active>a {
    color: var(--primary-color) !important;
}

/* Service section title styling */
.services-section h3,
#services-section h3 {
    color: #fff !important;
}

.services-1:hover h3 {
    color: var(--primary-color) !important;
}