/*
 * Plastomer Corporation - Corporate Blue Theme
 * A professional, sleek design with a blue color scheme
 */

/* ======================================
   Variables & Base Styles
   ====================================== */
:root {
    --primary-color: #0056b3;
    --primary-dark: #004494;
    --primary-light: #0077cc;
    --secondary-color: #6c757d;
    --accent-color: #f8f9fa;
    --dark-color: #212529;
    --light-color: #ffffff;
    --gray-color: #6c757d;

    --transition-base: all 0.3s ease;
    --box-shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.08);
    --box-shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* ======================================
   Header & Navigation
   ====================================== */
header {
    position: relative;
    margin-bottom: 2rem;
}

/* Top Bar */
.top-bar {
    background-color: var(--dark-color);
    color: white;
}

.top-bar-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-base);
    padding: 0.25rem 0.5rem;
    display: inline-block;
}

.top-bar-link:hover {
    color: var(--primary-light);
}

/* Main Header with Logo */
.main-header {
    background-color: white;
    box-shadow: var(--box-shadow-sm);
    position: relative;
    z-index: 100;
}

.logo {
    max-height: 100px; /* Increased from 60px */
    width: auto;
    transition: var(--transition-base);
    transform-origin: left center;
    animation: logoEnlarge 1s ease-out forwards;
}

@keyframes logoEnlarge {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.navbar.scrolled {
    box-shadow: var(--box-shadow-md);
    padding: 0.5rem 0;
}

.navbar.scrolled .logo {
    height: 80px; /* Increased from 50px */
}

/* Desktop Navigation Menu */
.desktop-menu {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: menuAppear 0.8s ease-out forwards;
}

@keyframes menuAppear {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.desktop-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.menu-row {
    margin: 0 -0.25rem;
}

/* Menu rows - consistent layout */
.menu-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

/* First row menu items */
.menu-row:first-child .col-2 {
    flex: 0 0 16.666%;
    max-width: 16.666%;
    padding: 0 0.25rem;
}

/* Second row menu items (smaller font) */
.menu-row:nth-child(2) {
    margin-top: 0.75rem;
}

.menu-item-wrapper {
    flex: 0 0 19%;
    max-width: 19%;
    padding: 0 0.25rem;
}

.menu-row:nth-child(2) .menu-item {
    font-size: 0.75rem;
    min-height: 50px; /* Consistent height for second row */
    padding: 0.25rem;
    width: 100%; /* Full width of wrapper */
    /* Same rounded rectangle as first row */
    border-radius: 8px;
}

.menu-item {
    display: block;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.25rem;
    text-align: center;
    transition: var(--transition-base);
    white-space: normal; /* Allow text to wrap */
    height: 100%;
    min-height: 60px; /* Set a minimum height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    width: 95%; /* Consistent width */
    margin: 0 auto; /* Center the buttons */
    position: relative;
    overflow: hidden;
    /* Rounded rectangle shape */
    border-radius: 8px;
    /* Add drop shadow */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Animation for menu items */
    animation: menuItemAppear 0.5s ease-out forwards;
    animation-fill-mode: both;
    opacity: 0;
    transform: translateY(20px);
}

/* Staggered animation delay for menu items */
.menu-row:first-child .col-2:nth-child(1) .menu-item { animation-delay: 0.1s; }
.menu-row:first-child .col-2:nth-child(2) .menu-item { animation-delay: 0.2s; }
.menu-row:first-child .col-2:nth-child(3) .menu-item { animation-delay: 0.3s; }
.menu-row:first-child .col-2:nth-child(4) .menu-item { animation-delay: 0.4s; }
.menu-row:first-child .col-2:nth-child(5) .menu-item { animation-delay: 0.5s; }
.menu-row:first-child .col-2:nth-child(6) .menu-item { animation-delay: 0.6s; }

.menu-row:nth-child(2) .menu-item:nth-child(1) { animation-delay: 0.7s; }
.menu-row:nth-child(2) .menu-item:nth-child(2) { animation-delay: 0.8s; }
.menu-row:nth-child(2) .menu-item:nth-child(3) { animation-delay: 0.9s; }
.menu-row:nth-child(2) .menu-item:nth-child(4) { animation-delay: 1.0s; }
.menu-row:nth-child(2) .menu-item:nth-child(5) { animation-delay: 1.1s; }

@keyframes menuItemAppear {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.menu-item::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.5s;
    border-radius: 8px; /* Match the button border radius */
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover,
.menu-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Active state with indicator */
.menu-item.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
}

/* Mobile Navigation Menu */
.mobile-menu {
    background-color: var(--dark-color);
    padding: 0;
    margin-top: 0;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
}

.mobile-menu-item {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--accent-color);
    transition: var(--transition-base);
    font-weight: 500;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
    background-color: var(--primary-light);
    color: var(--dark-color);
}

/* Navbar Toggler */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background-color: var(--primary-light);
    color: white;
    border-radius: 4px;
}

.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%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.secondary-nav .navbar-nav {
    width: 100%;
}

.secondary-nav .nav-link {
    color: white;
    font-weight: 500;
    padding: 0.75rem 0.5rem;
    position: relative;
    text-align: center;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.secondary-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: white;
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.secondary-nav .nav-link:hover,
.secondary-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.secondary-nav .nav-link:hover::after,
.secondary-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-base);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* ======================================
   Page Header
   ====================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
    margin-top: 60px; /* Account for the secondary nav */
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../shared/images/backgrounds/original-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: white;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* ======================================
   Hero Section
   ====================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 10rem 0 8rem;
    position: relative;
    overflow: hidden;
    margin-top: 60px; /* Account for the secondary nav */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../shared/images/backgrounds/original-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 700px;
}

/* ======================================
   Section Styles
   ====================================== */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ======================================
   Cards & Features
   ====================================== */
.card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
    transition: var(--transition-base);
    border: none;
    height: 100%; /* Ensure all cards have the same height */
    display: flex; /* Use flexbox for card content */
    flex-direction: column; /* Stack card content vertically */
}

/* Service Cards - specific styling for the Our Services section */
.service-card {
    background-color: white;
    border: none;
    box-shadow: var(--box-shadow-sm);
    transition: all 0.5s ease;
    position: relative;
    z-index: 5;
    opacity: 0;
    transform: translateY(20px);
}

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

.card-body {
    flex: 1; /* Allow card body to grow and fill available space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space content evenly */
}

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

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
    display: block;
    text-align: center;
    line-height: 1;
    position: relative;
    z-index: 10;
    width: 100%;
    height: auto;
}

.feature-icon i {
    display: inline-block;
    font-size: 3rem;
    color: var(--primary-color);
    width: 80px;
    height: 80px;
    line-height: 80px;
    background-color: rgba(0, 86, 179, 0.1);
    border-radius: 50%;
    margin-bottom: 1rem;
}

.card:hover .feature-icon {
    transform: scale(1.1);
}

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

.card-text {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: var(--transition-base);
    position: relative;
    z-index: 1;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 2;
    opacity: 0;
    transition: var(--transition-base);
}

.card:hover .product-image::before {
    opacity: 1;
}

.card:hover .product-image {
    transform: scale(1.05);
}

/* ======================================
   Buttons & Interactive Elements
   ====================================== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-light {
    background-color: white;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.btn-light:hover {
    background-color: #f8f9fa;
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ======================================
   Footer
   ====================================== */
.footer {
    background-color: #212529;
    color: white;
    padding: 5rem 0 2rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition-base);
}

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

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 3rem;
}

/* ======================================
   Utility Classes
   ====================================== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    box-shadow: var(--box-shadow-md);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

.theme-selector {
    position: fixed;
    top: -50%;
    left: 0;
    transform: translateY(-50%);
    background-color: white;
    border-radius: 0 10px 10px 0;
    box-shadow: var(--box-shadow-md);
    z-index: 999;
    padding: 1rem;
}

.theme-selector a {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition-base);
}

.theme-selector a:hover {
    color: var(--primary-color);
}

/* ======================================
   Responsive Adjustments
   ====================================== */
@media (max-width: 992px) {
    .hero-title, .page-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title, .page-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
}

/* Mobile Menu Fixes */
@media (max-width: 992px) {
    header {
        padding-top: 80px; /* Reduce padding for mobile */
    }

    .main-navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .main-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--primary-light);
        z-index: 999;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .navbar-collapse.show + .main-menu {
        max-height: 1000px;
    }

    .menu-row {
        flex-direction: column;
        padding: 0;
    }

    .menu-row:first-child {
        border-bottom: none;
    }

    .menu-item {
        width: 100%;
        text-align: left;
        padding: 0;
    }

    .menu-item a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        white-space: normal;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 0;
        z-index: 1000;
        width: 100%;
        max-width: 100%;
    }
}
