/* Modern Professional Design System */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 80px;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: var(--shadow-medium);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 1rem;
    padding: 0.5rem 0 !important;
    position: relative;
    transition: var(--transition);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after {
    width: 100%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: white !important;
}

/* Navbar Social Icons */
.navbar-social-icons a {
    transition: var(--transition);
    text-decoration: none;
}

.navbar-social-icons a:hover {
    color: rgba(255, 255, 255, 0.7) !important;
    transform: translateY(-2px);
}

/* Language Switcher Dropdown */
#languageDropdown {
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--border-radius) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

#languageDropdown:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    box-shadow: none !important;
}

#languageDropdown:focus {
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

#languageDropdown:active {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    color: white !important;
}

/* Language Dropdown Menu */
.dropdown-menu {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.dropdown-menu .dropdown-item {
    color: white !important;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.dropdown-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Mobile Dropdown Positioning Fix */
@media (max-width: 767px) {
    .navbar .dropdown {
        position: relative !important;
    }
    
    .navbar .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        transform: none !important;
        margin-top: -40px !important;
        margin-right: 40px !important;
        min-width: 160px;
        border-radius: var(--border-radius) !important;
    }
    
    .navbar .dropdown-menu.show {
        display: block;
        transform: none !important;
    }
    
    .navbar .dropdown-toggle::after {
        margin-left: 0.5em !important;
    }

    .navbar-social-icons a {
        padding-left: 1rem;
    }
}

/* Sections */
section {
    padding: 5rem 0;
}

section:nth-child(even) {
    background: var(--background-light);
}

/* Buttons */
.btn {
    border: none;
    border-radius: var(--border-radius);
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #5a6fd8, #6b4190);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, var(--accent-color), #ec7063);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-danger:hover {
    background: linear-gradient(45deg, #c0392b, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

/* Contact buttons custom hover - use purple gradient instead of blue */
.contact-email .btn-outline-primary:hover {
    background: linear-gradient(45deg, #667eea, #764ba2) !important;
    border-color: #667eea !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Video Carousel Styling */
.custom-carousel {
    position: relative;
}

.carousel-inner {
    overflow: hidden;
    position: relative;
}

.carousel-item {
    transition: opacity 0.5s ease-in-out;
    min-height: 300px;
    opacity: 0;
    display: none;
    width: 100%;
}

.carousel-item.active {
    opacity: 1;
    display: block;
}

.carousel-control-prev,
.carousel-control-next {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.8);
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 1;
    border-color: white;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
}

.carousel-indicators {
    bottom: -40px;
    margin-bottom: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    display: flex;
}

.carousel-indicators button {
    background-color: #007bff;
    border: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    opacity: 0.5;
    cursor: pointer;
}

.carousel-indicators button.active {
    opacity: 1;
    background-color: #0056b3;
}

/* Video title spacing */
.carousel h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 991.98px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .carousel-control-prev {
        left: 5px;
    }
    
    .carousel-control-next {
        right: 5px;
    }
    
    .carousel-indicators {
        bottom: -50px;
    }
    
    .carousel h5 {
        font-size: 1rem;
        margin-bottom: 0.5rem !important;
    }
}

/* Video Carousel Styling */
.custom-carousel {
    position: relative;
    padding-bottom: 60px;
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    margin: 2rem 0;
}

.carousel-inner {
    padding: 2rem;
    touch-action: pan-y pinch-zoom;
}

/* Home modal fullscreen styling */
.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.55) !important;
}

/* iframe container for links page */
.links-iframe-container {
    width: 92%;
    max-width: 1100px;
    height: 92vh;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    background: transparent;
}
.links-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    display: block;
}

@media (max-width: 576px) {
    .links-iframe-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Styles for the standalone links page */
.links-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(172,203,200,0.25) 0%, rgba(240,200,220,0.08) 100%);
    padding: 3rem 1rem;
}
.links-card {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg,#d6eef0,#f3d7e6);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    position: relative; /* allow absolute close button */
}
.links-avatar {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    border: 6px solid rgba(255,255,255,0.6);
}
.links-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}
.links-sub {
    color: #4b4b4b;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.links-list { display: grid; gap: 0.75rem; }
.links-item {
    display: grid;
    grid-template-columns: 56px 1fr 28px;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: #222;
}
.links-thumb img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.links-thumb { width: 56px; display:flex; align-items:center; justify-content:center; }
.links-text { font-weight: 600; }
.links-chevron { color: #999; font-size: 0.9rem; text-align: right; }

/* Larger modal card on desktop */

@media (min-width: 992px) {
    /* keep the modal card compact on desktop (revert to smaller card) */
    .modal .links-card {
        max-width: 480px;
        width: 92%;
        max-height: 88vh;
        border-radius: 14px;
        padding: 2rem;
    }

    .modal .links-list { max-width: 420px; margin: 0 auto; gap: 0.75rem; }
    .modal .links-item { padding: 0.75rem 0.75rem; border-radius: 10px; }
}

/* Position and style close button inside the modal card so it's always clickable */
.modal .btn-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 30;
}


.carousel-item {
    transition: opacity 0.6s ease-in-out;
    min-height: 300px;
    opacity: 0;
    display: none;
    width: 100%;
}

.carousel-item.active {
    opacity: 1;
    display: block;
}

.carousel-item h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.carousel-item .ratio {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.carousel-item .ratio:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.carousel-control-prev,
.carousel-control-next {
    background: var(--background-white);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) saturate(100%) invert(21%) sepia(8%) saturate(1627%) hue-rotate(169deg) brightness(97%) contrast(88%);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: brightness(0) saturate(100%) invert(100%);
}

.carousel-indicators {
    bottom: 40px;
    margin-bottom: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    display: flex;
    gap: 8px;
}

.carousel-indicators button {
    background: var(--border-color);
    border: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0.7;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicators button:hover {
    background: var(--secondary-color);
    opacity: 0.8;
    transform: scale(1.2);
}

.carousel-indicators button.active {
    opacity: 1;
    background: var(--secondary-color);
    transform: scale(1.3);
}

/* Performance Optimizations */
iframe {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    will-change: transform; /* Optimize for animations */
}

/* Preload critical resources */
.about-image {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    will-change: transform;
    content-visibility: auto; /* Browser optimization */
}

.about-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--background-white);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Privacy Notice */
.privacy-notice {
    background: rgba(108, 117, 125, 0.1);
    border: 1px solid rgba(108, 117, 125, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.privacy-notice p {
    line-height: 1.5;
    margin-bottom: 0;
}

.privacy-notice i {
    color: var(--secondary-color);
}

/* Cards and Content Boxes */
.content-box {
    background: var(--background-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.content-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* List Styling */
.list-group-item {
    background: var(--background-white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.list-group-item:hover {
    border-color: var(--secondary-color);
    transform: translateX(5px);
}

/* Footer */
footer {
    background: var(--primary-color) !important;
    color: white;
    padding: 2rem 0;
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--secondary-color);
}

/* Maps iframe */
iframe {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

/* Enhanced touch area for carousel */
.carousel {
    touch-action: pan-y pinch-zoom;
}

/* Make entire video section swipeable */
#videos .container {
    position: relative;
}

/* Additional overflow protection */
.container-fluid {
    overflow-x: hidden;
}

.carousel {
    overflow: hidden;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    
    .custom-carousel {
        margin: 1rem 0;
        padding-bottom: 20px; /* Reduced from 30px */
    }
    
    .custom-carousel .carousel-inner {
        padding: 1rem;
    }
    
    .carousel-item {
        min-height: 250px; /* Reduced from 400px */
    }
    
    .carousel-item .ratio {
        min-height: 180px; /* Reduced from 200px */
    }
    
    .carousel-indicators {
        bottom: 30px; /* Raised higher for better spacing */
    }
    
    .carousel-indicators button {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        flex-shrink: 0; /* Prevent distortion */
        transform: none; /* Reset any scaling on mobile */
    }
    
    .carousel-indicators button:hover {
        transform: scale(1.1); /* Smaller scale for mobile */
    }
    
    .carousel-indicators button.active {
        transform: scale(1.2); /* Smaller active scale for mobile */
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 45px;
        height: 45px;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .carousel-item h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Better mobile spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back-to-top:hover {
    background: linear-gradient(45deg, #5a6fd8, #6b4190);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile adjustments for back to top button */
@media (max-width: 768px) {
    .btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}