/* Custom CSS for Novel Global Company */

/* Root Variables */
:root {
    --primary-color: #2c5530;
    --secondary-color: #4a7c59;
    --accent-color: #8bc34a;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Bootstrap Color Overrides */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

/* Section Spacing */
section {
    padding: 80px 0;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    color: var(--text-dark);
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

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

.navbar-nav .nav-link:not(.dropdown-toggle):hover::after {
    width: 100%;
}

/* Dropdown Menu Styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.dropdown-divider {
    margin: 0.5rem 1rem;
    border-top: 1px solid #e9ecef;
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Mega Menu Styling */
.dropdown-menu.mega-menu {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
    border: none;
    border-radius: 0;
    padding: 2rem 0;
    margin-top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: var(--white);
    min-height: 300px;
    z-index: 1050;
}

.mega-menu .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.mega-menu .row {
    margin-left: 0;
    margin-right: 0;
    display: flex;
    flex-wrap: wrap;
}

.mega-menu .dropdown-header {
    font-weight: 700;
    color: var(--text-dark);
    padding: 0 0 0.75rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    word-wrap: break-word;
}

.mega-menu .dropdown-item {
    padding: 0.4rem 0;
    font-weight: 400;
    font-size: 0.85rem;
    border: none;
    background: none;
    color: #666;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    display: block;
    text-decoration: none;
    word-wrap: break-word;
}

.mega-menu .dropdown-item:hover {
    background-color: transparent;
    color: var(--primary-color);
    padding-left: 0.25rem;
    transform: none;
    text-decoration: none;
}

.mega-menu-image {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, #f0f8f0 100%);
    border-radius: var(--border-radius);
    height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.mega-menu-image img {
    max-height: 100px;
    width: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.mega-menu-image h6 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--primary-color);
    white-space: normal;
    line-height: 1.3;
}

.mega-menu-image p {
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    white-space: normal;
}

.mega-menu .row {
    min-height: 320px;
    align-items: flex-start;
}

.mega-menu .col-md-2 {
    padding: 1.25rem 0.75rem;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    flex: 1;
}

.mega-menu .col-md-2:last-of-type {
    border-right: none;
}

.mega-menu .col-md-4 {
    padding: 1rem;
    display: flex;
    align-items: stretch;
}

/* Fix dropdown positioning and behavior */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .navbar-nav .dropdown .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    .navbar-nav .dropdown:hover > .dropdown-toggle::after {
        transform: rotate(180deg);
    }
    
    .dropdown-toggle::after {
        transition: transform 0.3s ease;
    }
}

/* Mobile dropdown behavior */
@media (max-width: 991px) {
    .mega-menu {
        position: static !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding: 1rem;
        min-height: auto;
    }
    
    .mega-menu .row {
        min-height: auto;
        flex-direction: column;
    }
    
    .mega-menu .col-md-2,
    .mega-menu .col-md-4 {
        margin-bottom: 1.5rem;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid #eee;
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .mega-menu .col-md-2:last-child,
    .mega-menu .col-md-4:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .mega-menu .dropdown-item {
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }
    
    .mega-menu .dropdown-header {
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }
}

/* Responsive Mega Menu */
@media (max-width: 768px) {
    .mega-menu .col-md-2 {
        padding: 0.75rem;
    }
    
    .mega-menu-image {
        padding: 1rem;
    }
    
    .mega-menu-image img {
        max-height: 80px;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f5e8 100%);
    position: relative;
    padding-top: 120px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    transition: opacity 0.4s ease-in-out;
}

.hero-content .lead {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.6;
    transition: opacity 0.4s ease-in-out;
}

.hero-buttons .btn {
    margin: 0.5rem;
    min-width: 160px;
    transition: opacity 0.4s ease-in-out;
}

/* Hero Slider Styles - Enhanced Deck Card Effect */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1200px;
    padding: 20px 0 40px 0;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 480px;
    transform-style: preserve-3d;
    cursor: pointer;
}

.slide {
    position: absolute;
    top: 0;
    left: 50%;
    width: 90%;
    height: 100%;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center center;
    backface-visibility: hidden;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.slide.active {
    z-index: 10;
    transform: translateX(-50%) translateY(0px) translateZ(0px) rotateX(0deg) rotateY(0deg) scale(1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 10px 25px rgba(0, 0, 0, 0.2);
}

.slide.next {
    z-index: 9;
    transform: translateX(-48%) translateY(15px) translateZ(-60px) rotateX(-3deg) rotateY(-2deg) scale(0.95);
    opacity: 0.8;
}

.slide.prev {
    z-index: 8;
    transform: translateX(-46%) translateY(30px) translateZ(-120px) rotateX(-6deg) rotateY(-4deg) scale(0.9);
    opacity: 0.6;
}

.slide.exit {
    z-index: 11;
    transform: translateX(50%) translateY(-80px) translateZ(50px) rotateX(10deg) rotateY(25deg) rotateZ(15deg) scale(0.8);
    opacity: 0;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
    user-select: none;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.slide.active img {
    transform: scale(1.02);
}

/* Add a subtle gradient overlay for better text readability */
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    z-index: 1;
    pointer-events: none;
    border-radius: 17px;
}

/* Hover effects */
.slider-container:hover .slide.active {
    transform: translateX(-50%) translateY(-5px) translateZ(10px) rotateX(0deg) rotateY(0deg) scale(1.02);
}

.slider-indicators {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 15;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translate(-50%, -50%);
}

.indicator.active::before {
    width: 100%;
    height: 100%;
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.4);
}

.indicator:hover {
    background: rgba(52, 152, 219, 0.6);
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grain" width="200" height="200" patternUnits="userSpaceOnUse"><circle cx="100" cy="100" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

/* About Section */
.about-content {
    padding: 2rem 0;
}

.feature-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background-color: var(--bg-light);
    transform: translateX(10px);
}

.feature-icon i {
    font-size: 1.5rem;
}

.feature-item h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-card .card-title {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card .card-text {
    color: var(--text-light);
    line-height: 1.6;
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.product-card img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.product-card .card-text {
    color: var(--text-light);
}

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="dots" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>') repeat;
}

.stat-item {
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Contact Section */
.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.contact-form .form-control {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 85, 48, 0.25);
}

.contact-info {
    padding: 2rem;
    text-align: center;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    height: 100%;
    transition: all 0.3s ease;
}

.contact-info:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.contact-info h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 0;
}

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

footer h5, footer h6 {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color) !important;
}

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

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

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-buttons {
        margin-top: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .feature-item:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 80px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 10px 20px;
        min-width: 140px;
    }
    
    .contact-form {
        padding: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::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: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Custom Placeholder Images Styling */
.placeholder-img {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 3rem;
    min-height: 250px;
}