/* Advice Section Horizontal Layout */
.advice-container {
    margin: 2rem auto;
    max-width: 900px;
}

.advice-grid {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
}

.advice-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 220px;
    max-width: 300px;
}

.advice-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(27,176,167,0.08);
}

.advice-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    text-align: center;
}

.advice-text {
    color: var(--text-light);
    text-align: center;
    font-size: 0.98rem;
}

.advice-Spec {
    color: var(--text-light);
    text-align: center;
    font-size: 0.98rem;
}

@media (max-width: 900px) {
    .advice-grid {
        gap: 1rem;
    }
    .advice-card {
        min-width: 160px;
        max-width: 220px;
    }
}

@media (max-width: 600px) {
    .advice-grid {
        flex-direction: column;
        align-items: center;
    }
    .advice-card {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
}
/* Global Styles */
:root {
    /* Theme colors - adjust these to match `img/fraxion-logo.png` if needed */
    --primary-color: #2c3e50; /* main text/heading */
    --secondary-color: #3498db; /* secondary/UI */
    --accent-color: #1bb0a7; /* accent color (approximate logo teal) */
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
header {
    background-color: #000; /* changed to black */
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
}

nav {
    position: relative;
    padding: 1.5rem 3rem;
}

.nav-center {
    display: flex;
    align-items: center;
    justify-content: center; /* center links */
    gap: 2rem;
    padding: 0 3.5rem; /* leave room for left logo and right burger */
}

.nav-center .nav-links {
    margin: 0;
}

.burger {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.logo span:first-child {
    color: #fff;
}

.logo span:last-child {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    color: #fff; /* nav links white on black header */
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--accent-color);
    outline: none;
}

.nav-links a:focus {
    box-shadow: 0 0 0 3px rgba(231,76,60,0.15);
    border-radius: 4px;
}

.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #fff; /* burger lines white for contrast */
    margin: 5px;
    transition: var(--transition);
}


/* Main Content */
main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
    animation: fadeIn 1s ease-in-out;
}

.hero-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    position: relative;
}

.slide-in {
    animation: slideIn 1s ease-in-out;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Features Section */
.features {
    padding: 4rem 0;
    text-align: center;
}

.features h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    text-align: center;
}

.testimonials h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto 2rem;
    position: relative;
    height: 200px;
    overflow: hidden;
}

.testimonial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

.testimonial.active {
    opacity: 1;
}

.testimonial p {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.author {
    font-weight: 700;
    color: var(--accent-color);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #bdc3c7;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--accent-color);
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.cta-button:hover {
    background-color: #c0392b;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 0;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 0 auto 2rem;
    max-width: 1200px;
    padding: 0 15px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #bdc3c7;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 0.8rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-icons a {
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Advanced Research Page */
.research-main {
    padding: 4rem 0;
}

.research-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.research-hero h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.research-hero p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.research-form {
    /* a soft teal wash that matches the --accent-color while keeping good contrast */
    background: linear-gradient(180deg, rgba(27,176,167,0.06) 0%, rgba(27,176,167,0.04) 100%);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(27,176,167,0.12); /* subtle outline */
    color: var(--primary-color);
}

.form-container {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: left;
    padding-left: 8px;
}

.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Recommendation Result */
.recommendation-result {
    padding: 3rem 0;
}

.result-container {
    max-width: 1000px;
    margin: 0 auto;
}

.result-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.result-card {
    display: flex;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-in-out;
}

.oil-image {
    flex: 1;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.oil-image img {
    max-height: 300px;
    object-fit: contain;
}

.oil-details {
    flex: 2;
    padding: 2rem;
}

.oil-details h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.oil-details p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.oil-benefits {
    margin: 2rem 0;
}

.oil-benefits h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.oil-benefits ul {
    list-style-position: inside;
    margin-top: 1rem;
}

.oil-benefits li {
    margin-bottom: 0.5rem;
}

/* About Us Page */
.about-main {
    padding: 4rem 0;
}

.about-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.about-hero h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.about-hero p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.about-content {
    padding: 3rem 0;
}

.about-container {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.about-text {
    flex: 2;
}

.about-text h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.values {
    padding: 3rem 0;
    text-align: center;
}

.values h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.value-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.value-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .about-container {
        flex-direction: column;
    }

    .result-card {
        flex-direction: column;
    }

    .nav-links {
        position: absolute;
        left: 0;
        right: 0;
        top: 80px;
        background: #000; /* mobile menu background stays black */
        flex-direction: column;
        width: 100%;
        text-align: center;
        clip-path: circle(0px at 90% -10%);
        transition: all 0.5s ease-out;
        pointer-events: none;
        z-index: 1001;
    }

    .nav-links.active {
        clip-path: circle(1000px at 90% -10%);
        pointer-events: all;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .burger {
        display: block;
    }

    .burger.active .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .burger.active .line2 {
        opacity: 0;
    }

    .burger.active .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

@media (max-width: 480px) {
    .research-form {
        padding: 2rem 1rem;
    }

    .feature-card, .value-card {
        padding: 1.5rem;
    }
}
/* Modal */
.spec-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    overflow-y: auto;           /* allow scrolling */
    padding: 30px 15px;         /* space so content isn't glued to edges */
}

.spec-modal-content {
    background: white;
    width: 80%;
    max-width: 900px;
    padding: 2rem;
    border-radius: 12px;
    position: relative;   /* 🔑 THIS anchors the X */
    animation: fadeInUp 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.spec-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s ease;
}

.spec-btn:hover {
    background: #c0392b;   /* 🔴 rouge élégant */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(229,57,53,0.35);
}

.spec-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #555;
    z-index: 100;
    background: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    line-height: 34px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.spec-close:hover {
    background: var(--accent-color);
    color: white;
}

.spec-layout {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.spec-left {
    flex: 1;
}

.spec-left h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.spec-left p {
    color: var(--text-light);
    line-height: 1.6;
}

.spec-right {
    flex: 1;
    text-align: center;
}

.spec-right img {
    max-width: 100%;
    border-radius: 10px;
}


/* Mobile layout */
@media (max-width: 768px) {
    .spec-layout {
        flex-direction: column;
    }

    .spec-right img {
        max-height: 250px;
        object-fit: contain;
    }
}

/* ================================
   Homogenize Advice Cards Layout
================================ */

/* Force all cards to behave the same */
.advice-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Fix image height so all images align */
.advice-img {
    height: 265px;              /* same visual height */
    object-fit: contain;
}

/* Force title to occupy the same vertical space (max 2 lines) */
.advice-title {
    min-height: 2.6em;          /* ≈ 2 lines */
    line-height: 1.3;
    text-align: center;
    overflow: hidden;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Align all SpecificCode blocks */
.advice-Spec {
    min-height: 1.6em;
    margin-bottom: 10px;
    font-weight: 600;
    /*color: var(--accent-color);*/
    text-align: center;
}

/* Push button to bottom so all buttons align */
.spec-btn {
    margin-top: auto;
}
