/* Custom CSS for Kaya Group Malta Website */

/* Global Styles */
:root {
    --primary-color: #0066cc;
    --secondary-color: #ffc107;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Utility Classes */
.min-vh-75 {
    min-height: 75vh;
}

.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover lift effect */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    background: white !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1.2em;
}

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    margin: 0 0.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 25px;
    color: #333 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
}

.navbar-nav .nav-link i {
    font-size: 1rem;
    width: 18px;
    min-width: 18px;
    text-align: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-nav .nav-link span {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(0, 102, 204, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.navbar-nav .nav-link:hover i {
    transform: scale(1.2);
    color: var(--primary-color);
}

.navbar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

.navbar-nav .nav-link.active i {
    color: white !important;
}

.navbar-nav .nav-link.active span {
    color: white !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
    left: 10%;
}

.navbar-nav .nav-link.active::after {
    display: none;
}

/* Desktop specific adjustments */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
        justify-content: center;
        text-align: center;
        min-width: 120px;
    }
    
    .navbar-nav .nav-link span {
        text-align: center;
    }
}

/* Dropdown Menu Improvements */
.dropdown-menu {
    border: none;
    border-radius: 15px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 180px;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white !important;
    transform: translateX(5px);
    text-decoration: none;
}

.dropdown-item i {
    width: 20px;
    min-width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

/* Language dropdown specific */
.dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Mobile Navbar Improvements */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding-top: 1rem;
        background-color: rgba(248, 249, 250, 0.95);
        border-radius: 15px;
        margin-top: 1rem;
        padding: 1rem;
        align-items: stretch;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem !important;
        border-radius: 10px;
        justify-content: flex-start;
        min-width: auto;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: var(--primary-color);
        color: white !important;
    }
    
    .navbar-nav .nav-link:hover i,
    .navbar-nav .nav-link:hover span {
        color: white !important;
    }
    
    .dropdown-menu {
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        margin-top: 0;
    }
    
    .dropdown-item {
        color: #666 !important;
        background-color: rgba(255, 255, 255, 0.9);
        margin: 0.25rem 0;
        border-radius: 8px;
    }
    
    .dropdown-item:hover {
        background-color: var(--primary-color) !important;
        color: white !important;
    }
}

/* Navbar Toggle Button */
.navbar-toggler {
    padding: 0.375rem 0.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 102, 204, 0.2);
}

.navbar-toggler:hover {
    background-color: rgba(0, 102, 204, 0.1);
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.9), rgba(0, 123, 255, 0.8));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.service-card .icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem auto;
}

/* Product Category Cards */
.product-category {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.product-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.product-category:hover::before {
    left: 100%;
}

.product-category:hover {
    transform: translateY(-15px);
    border-color: var(--primary-color);
    box-shadow: 0 25px 50px rgba(0, 102, 204, 0.15);
}

.product-category .category-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem auto;
    transition: all 0.3s ease;
}

.product-category:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Service Grid Items */
.service-grid-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.service-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.service-grid-item .service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem auto;
    transition: all 0.3s ease;
}

.service-grid-item:hover .service-icon {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
}

.btn-warning {
    background: linear-gradient(45deg, var(--warning-color), #e6a800);
    color: #333;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

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

/* Forms */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-label {
    color: #555;
    margin-bottom: 8px;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

/* Contact Info */
.contact-info .icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Testimonials */
.blockquote {
    font-style: italic;
    position: relative;
}

.blockquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: -10px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

/* Blog Cards */
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Projects Section */
.project-item {
    transition: all 0.3s ease;
}

.project-overlay {
    background: rgba(0, 102, 204, 0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-item .card {
    overflow: hidden;
}

.project-item:hover .card {
    transform: translateY(-10px);
}

.project-item .card-img-top {
    transition: all 0.3s ease;
    height: 250px;
    object-fit: cover;
}

.project-item:hover .card-img-top {
    transform: scale(1.1);
}

/* Project Filter Buttons */
.btn-group .btn {
    transition: all 0.3s ease;
}

.btn-group .btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-group .btn:not(.active):hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Project Statistics */
.project-stats {
    background: linear-gradient(135deg, var(--light-color), #e9ecef);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d) !important;
}

footer h5,
footer h6 {
    color: var(--warning-color) !important;
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-section .container {
        padding: 3rem 0;
    }
    
    section {
        padding: 60px 0;
    }
    
    .btn-lg {
        padding: 10px 25px;
        font-size: 1rem;
    }
    
    .product-category {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-grid-item {
        margin-bottom: 1rem;
    }
    
    /* Mobile Navbar Specific */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .hero-section .d-flex {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-section .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .contact-info .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info .icon-box {
        margin: 0 auto 1rem auto;
    }
    
    .product-category .category-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    /* Extra small screens navbar */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link span {
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Background Patterns */
.bg-pattern {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Image Placeholders */
img[src=""], 
img:not([src]) {
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: block;
    color: #999;
    text-align: center;
    line-height: 250px;
}

img[src=""]:before, 
img:not([src]):before {
    content: "Image";
    font-size: 1rem;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer .social-links {
        display: none !important;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer .social-links {
        display: none !important;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}

/* Icon Improvements */
.fas, .far, .fab {
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Ensure icons are properly aligned */
.nav-link i,
.dropdown-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
}

/* Fix for potential icon loading issues */
.navbar-nav .nav-link i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands";
    font-weight: 900;
}

/* Fallback for missing icons */
.nav-link i:not(.fab):not(.far):not(.fas) {
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

/* Enhanced navbar for better icon display */
.navbar-nav .nav-link {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    line-height: 1.4;
}

/* Ensure proper text wrapping for longer menu items */
.navbar-nav .nav-link span {
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
}

/* Specific fixes for multi-word menu items */
.navbar-nav .nav-item .nav-link span {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Better spacing for two-word menu items */
.navbar-nav .nav-link:contains("About Us"),
.navbar-nav .nav-link:contains("Get Quote") {
    min-width: 140px;
}

@media (min-width: 992px) {
    .navbar-nav .nav-link {
        justify-content: center;
        text-align: center;
        min-width: 110px;
        padding: 0.6rem 0.8rem !important;
        margin: 0 0.1rem;
    }
    
    .navbar-nav .nav-link i {
        margin-right: 0.4rem;
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link span {
        font-size: 0.9rem;
        font-weight: 500;
        line-height: 1.2;
        white-space: nowrap;
    }
    
    /* Make brand logo more prominent */
    .navbar-brand {
        font-size: 1.6rem;
        margin-right: 1.5rem;
    }
    
    /* Specific width adjustments for multi-word items */
    .navbar-nav .nav-item:nth-child(2) .nav-link,  /* About Us */
    .navbar-nav .nav-item:nth-child(6) .nav-link { /* Get Quote */
        min-width: 120px;
    }
    
    /* Adjust dropdown */
    .navbar-nav .dropdown-toggle::after {
        margin-left: 0.4rem;
    }
}

/* Fix icon font loading issues */
.navbar-nav .nav-link i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

/* Fallback for missing icons */
.nav-link i:not(.fab):not(.far):not(.fas):not(.fa) {
    width: 18px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.nav-link i:not(.fab):not(.far):not(.fas):not(.fa)::before {
    content: "•";
}

@media (min-width: 992px) {
    .navbar-nav .nav-link {
        justify-content: center;
    }
}

/* Smooth transitions for all interactive elements */
a, button, .btn, .nav-link, .dropdown-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states for accessibility */
.nav-link:focus,
.btn:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading state for buttons */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
