:root {
    --primary-color: #2c3e50;
    --secondary-color: #e67e22;
    --accent-color: #f8f9fa;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --gradient-primary: linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 100%
        );
    --gradient-secondary: linear-gradient(
        135deg,
        #f093fb 0%,
        #f5576c 100%
        );
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

/* Enhanced Navbar */
.navbar {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-soft);
}

.navbar-brand {
    font-family: "Playfair Display", serif;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
}
.navbar-logo {
    width: 35px;
    height: 40px;
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    .navbar-logo {
        width: 20px;
        height: 30px;
    }
}
@media (min-width: 769px) {
    .navbar-brand {
        font-size: 2.2rem !important;
    }
}

.navbar-nav .nav-link {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    text-transform: uppercase;
    position: relative;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 25px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    background: var(--gradient-primary);
    color: #fff !important;
    transform: translateY(-2px);
}

/* Modern Carousel */
.carousel-item {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: var(--transition);
}

.carousel-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.6);
}

.carousel-caption {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    max-width: 800px;
}

.carousel-caption h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

.carousel-caption p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 300;
    margin-bottom: 2rem;
    text-shadow: 1px 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.btn-modern {
    background: var(--gradient-secondary);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    animation: fadeInUp 1s ease-out 0.6s both;
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: var(--gradient-primary);
}

/* Modern Sections */
section {
    padding: 1rem 0;
    position: relative;
}

.section-title {
    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

/* Services Cards */
#services {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.service-card {
    background: #fff;
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.service-card h4 {
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

/* Portfolio Grid */
#portfolio {
    background: #fff;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.portfolio-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 0.9;
}

.portfolio-overlay i {
    color: #fff;
    font-size: 3rem;
    transform: scale(0);
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay i {
    transform: scale(1);
}

/* About Section */
#about {
    background: var(--gradient-primary);
    color: #fff;
}

#about .section-title {
    color: #fff;
}

#about .section-title::after {
    background: #fff;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    font-weight: 300;
    text-align: center;
    line-height: 1.8;
}

/* Modern Footer */
footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    text-align: center;
    padding: 1rem 0 1rem;
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
}

footer h2 {
    font-family: "Playfair Display", serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

footer p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.footer-cta:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    color: var(--primary-color);
}

.footer-cta i {
    font-size: 1.2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Bootstrap-based tablet tweaks (kept) */
@media (max-width: 768px) {
    .carousel-item {
        height: 70vh;
    }

    section {
        padding: 3rem 0;
    }

    .service-card {
        margin-bottom: 2rem;
    }
}

/* ===========================================================
   MOBILE ENHANCEMENTS — viewport widths ≤ 575.98 px
   =========================================================== */
@media (max-width: 575.98px) {
    /* Global rhythm */
    html {
        scroll-padding-top: 4.25rem;
    }
    section {
        padding: 2.5rem 0;
    }

    /* Navbar */
    .navbar {
        padding: 0.75rem 0.2rem;
    }
    .navbar-brand {
        font-size: 1.1rem;
    }
    .navbar .navbar-toggler {
        font-size: 1.35rem;
        padding: 0.3rem 0rem;
    }
    .navbar-toggler:focus {
        box-shadow: none;
    }
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.96);
        margin: 0 -1rem;
        padding: 0.75rem 1rem;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    .navbar-nav .nav-link {
        display: block;
        margin: 0.35rem 0;
        padding: 0.8rem 1rem !important;
    }

    /* Hero / Carousel */
    .carousel-item {
        height: 60vh;
    }
    .carousel-caption {
        position: absolute;
        top: 45%;
        left: 50%;
        width: 75%;
    }
    .carousel-caption h1 {
        font-size: 1.8rem;
    }
    .carousel-caption p {
        font-size: 0.95rem;
    }

    /* Services cards */
    .service-card {
        padding: 1rem 1.25rem;
    }
    .service-card i {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    .service-card h4 {
        font-size: 1.25rem;
    }

    /* Portfolio */
    .portfolio-item img {
        height: 200px;
    }

    /* About */
    .about-content {
        font-size: 1rem;
    }

    /* Footer */
    footer h2 {
        font-size: 1.75rem;
    }
    footer p {
        font-size: 1rem;
    }
}

/* ===========================================================
   ACCESSIBILITY — honour “Reduce motion” preference
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

/* Mobile adjustments */
@media (max-width: 575.98px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.1rem;
    }
}

/* Pulse animation for extra attention */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 87, 108, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(245, 87, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 87, 108, 0); }
}

.scroll-to-top.pulse {
    animation: pulse 2s infinite;
}