/**
 * PT. Bina Satri Mandiri Jaya - Ultra Modern Animated Theme
 * "Full Animation" & Premium Glassmorphism
 */

/* ========================================
   CSS Variables & Root Styles
   ======================================== */
:root {
    /* Vivid Palette */
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-dark: #4338ca;
    /* Indigo 700 */
    --primary-light: #818cf8;
    /* Indigo 400 */

    --secondary-color: #ec4899;
    /* Pink 500 */
    --accent-color: #8b5cf6;
    /* Violet 500 */
    --cyan-color: #06b6d4;
    /* Cyan 500 */

    /* Backgrounds */
    --bg-body: #0f172a;
    /* Slate 900 (Dark Mode Base) */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Glassy Slate 800 */
    --bg-glass: rgba(255, 255, 255, 0.05);

    /* Text */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-glow: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Effects */
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-neon: 0 0 10px rgba(99, 102, 241, 0.5), 0 0 20px rgba(99, 102, 241, 0.3);
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);

    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    --border-radius: 24px;
}

/* ========================================
   Animations (Keyframes)
   ======================================== */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

@keyframes rotate-gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes entrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Base Styles
   ======================================== */
body {
    font-family: 'Outfit', 'Inter', sans-serif;
    /* Modern Font */
    background-color: var(--bg-body);
    color: var(--text-muted);
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 40%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: var(--primary-light);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.section {
    padding: 100px 0;
    position: relative;
}

/* ========================================
   Floating Glass Navigation
   ======================================== */
.navbar {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(20px);
    border-bottom: var(--border-glass);
    padding: 20px 0;
    transition: var(--transition);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.5);
}

.navbar-scrolled {
    padding: 10px 0;
    background: rgba(15, 23, 42, 0.9) !important;
    box-shadow: var(--shadow-glass);
}

.navbar-brand h3 {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-glow);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rotate-gradient 5s ease infinite;
}

.nav-item {
    margin: 0 5px;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 600;
    padding: 10px 25px !important;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    border-radius: 50px;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
    transform: scaleX(1);
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon);
}

/* ========================================
   Hero Section (Animated)
   ======================================== */
.hero-slide {
    height: 850px;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), var(--bg-body));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: entrance 1s ease-out;
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    animation: entrance 1s ease-out 0.2s backwards;
}

.btn-hero {
    padding: 18px 45px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-primary);
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: var(--transition);
    box-shadow: var(--shadow-neon);
    animation: entrance 1s ease-out 0.4s backwards;
}

.btn-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

.btn-hero:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

/* ========================================
   Service Cards (Holographic Glass)
   ======================================== */
.service-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: var(--border-glass);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover {
    transform: translateY(-15px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: var(--shadow-neon);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 30px;
    background: var(--bg-glass);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-light);
    position: relative;
    transition: var(--transition);
    animation: float 6s ease-in-out infinite;
}

.service-card:hover .service-icon {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.service-card h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* ========================================
   Interactive Cards (News/Portfolio)
   ======================================== */
.card {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-glass);
    border-color: var(--secondary-color);
}

.card-img-wrapper {
    overflow: hidden;
    position: relative;
}

.card-img-top {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .card-img-top {
    transform: scale(1.15);
}

.card-body {
    padding: 25px;
    position: relative;
    z-index: 1;
}

.card-title a {
    color: var(--text-main);
    background: linear-gradient(to right, var(--text-main), var(--text-main) 50%, var(--primary-color) 50%);
    background-size: 200% 100%;
    background-position: 0%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.3s ease;
}

.card:hover .card-title a {
    background-position: 100%;
}

/* ========================================
   Modern News Cards
   ======================================== */
.news-card-modern {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.news-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glass);
    border-color: var(--primary-color);
}

.news-card-img {
    position: relative;
    padding-top: 60%;
    /* Aspect Ratio 5:3 */
    overflow: hidden;
}

.news-card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-card-modern:hover .news-card-img img {
    transform: scale(1.15);
}

.news-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    color: #fff;
    padding: 8px 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
    text-align: center;
    line-height: 1.2;
}

.news-date-badge span {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-light);
}

.news-category-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: var(--gradient-primary);
    color: #fff;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-neon);
    z-index: 2;
}

.news-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.news-card-modern h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-card-modern h5 a {
    color: var(--text-main);
    background: linear-gradient(to right, var(--text-main), var(--text-main) 50%, var(--primary-color) 50%);
    background-size: 200% 100%;
    background-position: 0%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.3s ease;
}

.news-card-modern:hover h5 a {
    background-position: 100%;
}

.news-card-modern p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.news-meta i {
    color: var(--primary-light);
    margin-right: 5px;
}

.news-read-more {
    font-weight: 600;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
}

.news-read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.news-card-modern:hover .news-read-more i {
    transform: translateX(5px);
}

/* ========================================
   Buttons & UI Elements
   ======================================== */
.btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    box-shadow: var(--shadow-neon);
    transform: translateY(-3px);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-light);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-neon);
}

/* ========================================
   Footer (Dark Glass)
   ======================================== */
.footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: var(--border-glass);
    padding-top: 80px;
    position: relative;
}

.footer-widget {
    position: relative;
    z-index: 2;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
    border: 1px solid transparent;
}

.social-links a:hover {
    background: var(--gradient-primary);
    transform: translateY(-5px) rotate(360deg);
    box-shadow: var(--shadow-neon);
}

/* ========================================
   Utilities
   ======================================== */
.text-gradient {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Preloader */
.preloader {
    background: var(--bg-body);
}

.loader {
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top-color: var(--primary-color);
    box-shadow: var(--shadow-neon);
}

/* ========================================
   RESPONSIVE DESIGN - Mobile First Approach
   ======================================== */

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .navbar {
        padding: 12px 0;
    }

    .navbar-brand h3 {
        font-size: 1.3rem;
    }

    .navbar-collapse {
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        padding: 20px;
        border-radius: 20px;
        margin-top: 15px;
        box-shadow: var(--shadow-glass);
        border: var(--border-glass);
    }

    .nav-item {
        margin: 8px 0;
    }

    .nav-link {
        padding: 10px 15px !important;
        font-size: 0.95rem;
    }

    .section {
        padding: 60px 20px;
    }

    .hero-slide {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 60px;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 3rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .btn-hero {
        padding: 15px 40px;
        font-size: 1rem;
    }

    .service-card {
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .service-card h4 {
        font-size: 1.3rem;
    }

    .portfolio-item,
    .card {
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 2.5rem;
    }
}

/* Small Devices (576px - 767px) */
@media (max-width: 767px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    .section {
        padding: 40px 0;
    }

    .navbar {
        padding: 10px 0;
    }

    .navbar-brand {
        flex: 1;
    }

    .navbar-brand h3 {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar-toggler {
        padding: 5px 10px;
        border: none;
    }

    .hero-slide {
        height: auto;
        min-height: 80vh;
        padding: 80px 0 40px;
        background-attachment: scroll;
    }

    .hero-content {
        padding: 0 15px;
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .btn-hero {
        padding: 12px 30px;
        font-size: 0.95rem;
        width: 100%;
        display: block;
    }

    .service-card {
        padding: 25px 15px;
        margin-bottom: 15px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .service-card h4 {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    .section-title {
        text-align: center;
        margin-bottom: 40px;
    }

    .section-title h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .section-title p {
        font-size: 1rem;
    }

    .portfolio-item {
        margin-bottom: 15px;
    }

    .portfolio-item img {
        width: 100%;
        height: auto;
    }

    .card {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 15px;
    }

    .card h5 {
        font-size: 1.1rem;
    }

    .card p {
        font-size: 0.9rem;
    }

    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    .login-container {
        padding: 15px;
        margin: 20px auto;
        max-width: 100%;
    }

    .login-header {
        padding: 25px 15px;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .login-body {
        padding: 25px 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-control {
        font-size: 16px;
        padding: 10px 12px;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 10px 5px;
    }
}

/* Extra Small Devices (320px - 575px) */
@media (max-width: 575px) {
    html {
        scroll-behavior: auto;
    }

    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .container {
        padding: 0 12px;
    }

    .section {
        padding: 30px 0;
    }

    .navbar {
        padding: 8px 0;
    }

    .navbar-brand h3 {
        font-size: 0.95rem;
        max-width: 150px;
    }

    .navbar-brand img {
        max-width: 35px;
        height: auto;
    }

    .navbar-collapse {
        max-width: 100% !important;
    }

    .nav-item {
        margin: 5px 0;
    }

    .hero-slide {
        height: auto;
        min-height: 70vh;
        padding: 60px 0 30px;
    }

    .hero-slide::before {
        opacity: 0.9;
    }

    .hero-content {
        padding: 0 12px;
    }

    .hero-content h1 {
        font-size: 1.7rem;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .btn-hero {
        padding: 10px 25px;
        font-size: 0.85rem;
        width: 100%;
    }

    .section-title h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .section-title p {
        font-size: 0.9rem;
    }

    .service-card {
        padding: 20px 12px;
        margin-bottom: 12px;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .service-card h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .service-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .card {
        margin-bottom: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card h5 {
        font-size: 1rem;
    }

    .card p {
        font-size: 0.85rem;
    }

    .btn {
        padding: 7px 15px;
        font-size: 0.8rem;
        width: 100%;
    }

    .login-container {
        padding: 12px;
        margin: 15px auto;
    }

    .login-header {
        padding: 20px 12px;
    }

    .login-header h2 {
        font-size: 1.3rem;
    }

    .login-body {
        padding: 20px 12px;
    }

    .form-control {
        font-size: 16px;
        padding: 8px 10px;
        height: auto;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th,
    td {
        padding: 8px 3px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .owl-carousel .owl-nav button {
        padding: 5px 10px;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-header {
        padding: 15px;
    }
}

/* ========================================
   ENHANCED RESPONSIVE IMPROVEMENTS
   ======================================== */

/* Dropdown Menu - Better Mobile Behavior */
@media (max-width: 991px) {
    .dropdown-menu {
        background: rgba(30, 41, 59, 0.95);
        backdrop-filter: blur(10px);
        border: var(--border-glass);
        margin-top: 8px !important;
        box-shadow: var(--shadow-glass);
    }

    .dropdown-item {
        color: var(--text-main) !important;
        padding: 10px 20px;
        border-radius: 8px;
        margin: 2px 5px;
        transition: var(--transition);
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: var(--bg-glass);
        color: var(--primary-light) !important;
    }

    .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.1);
        margin: 8px 0;
    }
}

/* Touch-Friendly Tap Targets */
@media (max-width: 767px) {

    /* Minimum 44px tap target (iOS/Android guideline) */
    .btn,
    .nav-link,
    .dropdown-item,
    a.card,
    button {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-link {
        padding: 12px 20px !important;
    }

    /* Better spacing between tappable elements */
    .nav-item {
        margin: 8px 0;
    }

    .btn-group .btn,
    .pagination .page-link {
        margin: 4px;
    }
}

/* Table Responsiveness - Horizontal Scroll */
@media (max-width: 991px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        margin-bottom: 20px;
    }

    .table-responsive>.table {
        margin-bottom: 0;
        min-width: 600px;
    }

    /* Scroll indicator */
    .table-responsive::after {
        content: "← Geser untuk melihat lebih →";
        display: block;
        text-align: center;
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-top: 10px;
        padding: 8px;
        background: rgba(99, 102, 241, 0.1);
        border-radius: 8px;
    }
}

/* Image Optimization */
@media (max-width: 767px) {
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .card-img-top,
    .news-card-img img,
    .img-fluid {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Lazy loading hint */
    img[loading="lazy"] {
        background: var(--bg-glass);
        min-height: 200px;
    }
}

/* Form Controls - Better Mobile UX */
@media (max-width: 767px) {

    .form-control,
    .form-select,
    textarea.form-control {
        font-size: 16px !important;
        /* Prevent iOS zoom */
        padding: 12px 15px;
        border-radius: 12px;
        -webkit-appearance: none;
        appearance: none;
    }

    .form-group,
    .mb-3 {
        margin-bottom: 20px !important;
    }

    .form-label {
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 8px;
        display: block;
    }

    /* Better text area */
    textarea.form-control {
        min-height: 120px;
        resize: vertical;
    }

    /* Select dropdown */
    select.form-control,
    .form-select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        background-size: 12px;
        padding-right: 40px;
    }
}

/* Footer - Mobile Layout */
@media (max-width: 767px) {
    .footer {
        padding-top: 40px;
        padding-bottom: 20px;
    }

    .footer-widget {
        margin-bottom: 30px;
        text-align: center;
    }

    .footer-widget h5 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .footer-widget ul {
        padding-left: 0;
        list-style: none;
    }

    .footer-widget ul li {
        margin-bottom: 10px;
    }

    .social-links {
        display: flex;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .footer-bottom {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }

    .footer-bottom p {
        font-size: 0.85rem;
        margin: 0;
    }
}

/* Cards Grid - Responsive Columns */
@media (min-width: 1400px) {

    /* Extra large screens - 4 columns */
    .row-cols-xl-4>* {
        flex: 0 0 auto;
        width: 25%;
    }
}

@media (min-width: 992px) and (max-width: 1399px) {

    /* Large screens - 3 columns */
    .row-cols-lg-3>* {
        flex: 0 0 auto;
        width: 33.333%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {

    /* Medium screens - 2 columns */
    .row-cols-md-2>* {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (max-width: 767px) {

    /* Small screens - 1 column */
    .row>[class*="col-"] {
        width: 100%;
        margin-bottom: 20px;
    }

    /* Exception for 2-column grids on small mobile */
    .row-cols-2>* {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* Pagination - Mobile Friendly */
@media (max-width: 575px) {
    .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .page-link {
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
    }

    .pagination .page-item:not(.active):not(.disabled) .page-link {
        display: none;
    }

    .pagination .page-item.active .page-link,
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link,
    .pagination .page-item:nth-child(2) .page-link,
    .pagination .page-item:nth-last-child(2) .page-link {
        display: flex !important;
    }
}

/* Modal - Full Screen on Mobile */
@media (max-width: 575px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    .modal-content {
        height: 100%;
        border-radius: 0;
        border: none;
    }

    .modal-header {
        padding: 15px 20px;
        border-radius: 0;
    }

    .modal-body {
        padding: 20px;
        overflow-y: auto;
    }

    .modal-footer {
        padding: 15px 20px;
        border-radius: 0;
    }
}

/* Navbar - Sticky Behavior Enhancement */
@media (max-width: 767px) {
    .navbar.sticky-top {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
    }

    /* Add padding to body to prevent content jump */
    body {
        padding-top: 70px;
    }
}

/* Accessibility - Focus States */
@media (max-width: 991px) {

    a:focus,
    button:focus,
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .footer,
    .btn,
    .social-links,
    .preloader {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card,
    .service-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
        color: blue;
    }
}

/* Reduced Motion - Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Landscape Orientation - Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slide {
        min-height: 100vh;
        padding: 40px 0 20px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .navbar {
        padding: 6px 0;
    }
}