/* ===== OLIVIA TRADING - OPTIMIZED RESPONSIVE CSS ===== */

/* Modern Timeline Styles */
.timeline-modern {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 4rem;
    background: linear-gradient(to bottom, #889F67, #6d7f53);
    z-index: 1;
}

.timeline-content {
    background: #fff;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.timeline-icon {
    position: relative;
    z-index: 2;
}

.timeline-icon img {
    border: 4px solid #889F67;
    transition: transform 0.3s ease;
}

.timeline-icon:hover img {
    transform: scale(1.05);
}

/* Mobile Timeline Adjustments */
@media (max-width: 767.98px) {
    .timeline-item::after {
        left: 20px;
        transform: none;
    }
    
    .timeline-content {
        margin-left: 3rem;
    }
    
    .timeline-icon {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .timeline-icon img {
        width: 60px;
        height: 60px;
        max-width: none !important;
    }
}

/* Packaging Sections */
.packaging-section {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 3rem;
}

.packaging-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.packaging-section .carousel {
    border-radius: 10px;
    overflow: hidden;
}

.packaging-section .carousel-item img {
    transition: transform 0.3s ease;
}

.packaging-section .carousel:hover .carousel-item.active img {
    transform: scale(1.02);
}

/* Quality Cards Mobile Optimization */
@media (max-width: 575.98px) {
    .card-quality .front {
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
    }
    
    .card-quality .front:before {
        background: rgba(0, 0, 0, 0.1) !important;
        opacity: 0.3 !important;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .card-quality .front {
        background-size: cover !important;
        background-position: center !important;
    }
}

/* Hero Section Enhancements */
.hero-carousel .carousel-item {
    height: 450px;
    position: relative;
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-carousel .carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
}

/* Client Cards */
.client-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(136, 159, 103, 0.3) !important;
}

.client-logo {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo img {
    transition: transform 0.3s ease;
    filter: grayscale(20%);
}

.client-card:hover .client-logo img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.client-info .btn {
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.client-card:hover .btn {
    background-color: #889F67;
    border-color: #889F67;
    color: white;
    transform: scale(1.05);
}

/* Advantages Section - Modern Design */
.advantages-section {
    background: linear-gradient(135deg, #889F67 0%, #6d7f53 50%, #4a5a38 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.advantages-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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    opacity: 0.3;
    z-index: 1;
}

.advantages-section .container {
    position: relative;
    z-index: 2;
}

.advantage-item {
    position: relative;
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.advantage-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.advantage-item:hover::before {
    left: 100%;
}

.advantage-item:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.3);
}

.advantage-icon {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.advantage-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.advantage-item:hover .advantage-icon::after {
    opacity: 1;
}

.advantage-icon i {
    color: #fff;
    font-size: 2.5rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.advantage-item:hover .advantage-icon i {
    transform: scale(1.1) rotate(5deg);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.advantage-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.advantage-item:hover h3 {
    transform: translateY(-2px);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.advantage-item p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
    transition: all 0.3s ease;
}

.advantage-item:hover p {
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 767.98px) {
    .advantage-item {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .advantage-icon {
        width: 80px;
        height: 80px;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .advantage-icon i {
        font-size: 2rem;
    }
    
    .advantage-item h3 {
        font-size: 1.1rem;
    }
    
    .advantage-item p {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .advantages-section {
        padding: 3rem 0;
    }
    
    .advantage-item {
        padding: 1.25rem 0.75rem;
    }
    
    .advantage-icon {
        width: 70px;
        height: 70px;
    }
    
    .advantage-icon i {
        font-size: 1.75rem;
    }
}

/* Animation for items appearing */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advantage-item {
    animation: slideInUp 0.6s ease-out;
}

.advantage-item:nth-child(1) { animation-delay: 0.1s; }
.advantage-item:nth-child(2) { animation-delay: 0.2s; }
.advantage-item:nth-child(3) { animation-delay: 0.3s; }
.advantage-item:nth-child(4) { animation-delay: 0.4s; }
.advantage-item:nth-child(5) { animation-delay: 0.5s; }
.advantage-item:nth-child(6) { animation-delay: 0.6s; }

/* Off-Partner Section - Modern Design */
.off-partner-section {
    background: linear-gradient(135deg, #889F67 0%, #6d7f53 30%, #4a5a38 70%, #3a4529 100%);
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.off-partner-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 100 100"><defs><pattern id="grid2" width="15" height="15" patternUnits="userSpaceOnUse"><path d="M 15 0 L 0 0 0 15" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid2)"/></svg>') repeat;
    opacity: 0.4;
    z-index: 1;
}

.off-partner-section .container {
    position: relative;
    z-index: 2;
}

.partner-content-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem 2rem;
    margin: 2rem 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 
                0 5px 15px rgba(0, 0, 0, 0.05);
}

.partner-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s ease;
}

.partner-content-card:hover::before {
    left: 100%;
}

.partner-content-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.3);
}

.partner-description {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.partner-content-card:hover .partner-description {
    transform: translateY(-3px);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Enhanced Text Animation */
.animated-text-container {
    position: relative;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.text.animated-text {
    font-family: 'Nunito', sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
}

.text.animated-text li {
    display: inline-block;
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    opacity: 1;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.text.animated-text li::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: width 0.4s ease;
}

.text.animated-text.hidden li.ghost {
    opacity: 0;
    transform: scale(0.8);
    max-width: 0;
    overflow: hidden;
}

.text.animated-text li.spaced {
    margin-left: 0.6rem;
}

.text.animated-text.hidden li.spaced {
    margin-left: 0;
}

.text.animated-text:not(.hidden) li:hover::after {
    width: 100%;
}

/* Action Buttons */
.partner-actions {
    text-align: center;
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.modern-partner-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    min-width: 250px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modern-partner-btn::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: left 0.5s ease;
}

.modern-partner-btn:hover::before {
    left: 100%;
}

.modern-partner-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.modern-partner-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Responsive Design for Off-Partner Section */
@media (max-width: 767.98px) {
    .off-partner-section {
        padding: 2.5rem 0;
    }
    
    .partner-content-card {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }
    
    .partner-description {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .text.animated-text li {
        font-size: 1.4rem;
    }
    
    .modern-partner-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        min-width: 200px;
    }
}

@media (max-width: 575.98px) {
    .off-partner-section {
        padding: 2rem 0;
    }
    
    .partner-content-card {
        padding: 1.5rem 1rem;
    }
    
    .partner-description {
        font-size: 1.1rem;
    }
    
    .text.animated-text li {
        font-size: 1.2rem;
    }
    
    .animated-text-container {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .partner-actions {
        margin-top: 2rem;
    }
    
    .modern-partner-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-width: 180px;
    }
}

@media (min-width: 768px) {
    .partner-actions {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
}

/* Override old off-partner styles */
.off-partner {
    display: none !important;
}

/* Ensure new section takes precedence */
.off-partner-section {
    display: block !important;
}

/* Update existing text animation styles to work with new structure */
.text.animated-text li {
    float: none !important;
    display: inline-block !important;
}

.text.animated-text.hidden li.ghost {
    opacity: 0 !important;
    max-width: 0 !important;
    transform: scale(0.8) !important;
}

/* Site Header */
.site-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: #fff !important;
    color: #333 !important;
}

.site-header .navbar-nav .nav-link {
    color: #000 !important;
}

.site-header .navbar-nav .nav-link:hover,
.site-header .navbar-nav .nav-link.active {
    color: #889F67 !important;
}

.header-contact .tel {
    color: #889F67;
    text-decoration: none;
    font-size: 1.2rem;
}

.header-contact .tel:hover {
    color: #6d7f53;
}

/* Navigation */
.navbar-nav .nav-link {
    font-weight: 600;
    color: #000 !important;
    padding: 0.75rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #889F67 !important;
}

/* Footer */
.site-footer {
    background: #f8f9fa;
}

.footer-nav .list-inline-item:not(:last-child)::after {
    content: "|";
    margin: 0 0.5rem;
    color: #6c757d;
}

/* Modal Enhancements */
.feedback-div {
    position: relative;
    background-image: url(../images/feedback-background.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.feedback-div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    border-radius: inherit;
    z-index: -1;
}

.feedback-div .modal-header,
.feedback-div .modal-body {
    position: relative;
    z-index: 2;
}

.feedback-div .modal-content {
    position: relative;
    z-index: 2;
}

/* Form Styling */
.form__group {
    position: relative;
    padding: 15px 0 0;
    margin-top: 10px;
    width: 100%;
}

.form__field {
    font-family: inherit;
    width: 100%;
    border: 0;
    border-bottom: 2px solid #9b9b9b;
    outline: 0;
    font-size: 1.3rem;
    color: white;
    padding: 7px 0;
    background: transparent;
    transition: border-color 0.2s;
}

.form__field::placeholder {
    color: transparent;
}

.form__field:placeholder-shown ~ .form__label {
    font-size: 1.3rem;
    cursor: text;
    top: 20px;
}

.form__label {
    position: absolute;
    top: 0;
    display: block;
    transition: 0.2s;
    font-size: 1rem;
    color: white;
}

.form__field:focus {
    padding-bottom: 6px;
    font-weight: 700;
    border-width: 3px;
    border-image: linear-gradient(to right, #11998e, #38ef7d);
    border-image-slice: 1;
}

.form__field:focus ~ .form__label {
    position: absolute;
    top: 0;
    display: block;
    transition: 0.2s;
    font-size: 1rem;
    color: #11998e;
    font-weight: 700;
}

/* Partners Carousel */
.partners-section .partner-logo img {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.partners-section .partner-logo:hover img {
    transform: scale(1.05);
    opacity: 1;
}

/* Utility Classes */
.bg-fon {
    filter: brightness(60%);
}

/* Carousel Styles */
.carousel .carousel-item {
    height: 450px;
}

.carousel-item img {
    min-height: 450px;
}

.carousel-caption {
    height: 50%;
    overflow: hidden;
    margin: auto;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.carousel-caption h3 {
    font-weight: 700;
    font-size: 3.5em;
    margin-bottom: 0.5em;
}

.carousel-caption p {
    font-weight: 500;
    font-size: 1.5em;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Content Quality styles moved to quality-cards.css */

/* Mobile First Approach */
@media (max-width: 575.98px) {
    .hero-carousel .carousel-item {
        height: 300px;
    }
    
    .hero-carousel .carousel-caption {
        padding: 1rem;
    }
    
    .hero-carousel .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .hero-carousel .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .navbar-brand img {
        max-width: 140px !important;
    }
    
    .main-title-section h1 {
        font-size: 1.8rem;
    }
    
    .form__group {
        width: 100%;
    }
    
    /* Quality section optimization moved to quality-cards.css */

    
    /* Reduce excessive margins */
    .container-flex {
        margin: 1rem 0;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-carousel .carousel-item {
        height: 350px;
    }
    
    .navbar-brand img {
        max-width: 160px !important;
    }
    
    .main-title-section h1 {
        font-size: 2.2rem;
    }
    
    .form__group {
        width: 85%;
        margin: 10px auto;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-carousel .carousel-item {
        height: 400px;
    }
    
    .main-title-section h1 {
        font-size: 2.5rem;
    }
    
    .form__group {
        width: 70%;
        margin: 10px auto;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-carousel .carousel-item {
        height: 450px;
    }
    
    .form__group {
        width: 60%;
        margin: 10px auto;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .form__group {
        width: 50%;
        margin: 10px auto;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .modal,
    .hero-carousel,
    .btn {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .navbar-nav .nav-link {
        color: #000 !important;
    }
    
    .site-footer {
        background: #34495e;
        color: #fff;
    }
}



/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-carousel {
        animation: none;
    }
}

/* Focus Management */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced Accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}