/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    /* Color Palette - Premium & Trustworthy */
    --primary-color: #0f172a;
    /* Deep Slate Blue - Authority */
    --primary-light: #334155;
    /* Lighter Slate */
    --accent-color: #cca43b;
    /* Muted Gold - Premium */
    --accent-hover: #e5c155;

    --text-main: #1e293b;
    /* Slate 800 - Readable Text */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #f8fafc;
    /* Slate 50 */

    --bg-body: #f1f5f9;
    /* Very Light Blue-Grey */
    --bg-surface: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(204, 164, 59, 0.3);

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Transitions */
    --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    line-height: 1.25;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
    position: relative;
}

/* Components: Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.025em;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Components: Cards */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    height: 70px;
    /* Compress slightly on scroll */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.menu-toggle {
    display: none;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-light);
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.025em;
    transition: var(--transition);
}

header.scrolled .logo {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links li a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

header.scrolled .nav-links li a {
    color: var(--primary-color);
}

.btn-dashboard-nav,
.btn-logout-nav {
    padding: 0.5rem 1.25rem !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: var(--transition) !important;
}

.btn-dashboard-nav {
    background: var(--accent-color);
    color: var(--primary-color) !important;
}

.btn-dashboard-nav:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow);
}

.btn-logout-nav {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.btn-logout-nav:hover {
    background: #dc2626;
    color: white !important;
    border-color: #dc2626;
}

header.scrolled .btn-logout-nav {
    background: rgba(220, 38, 38, 0.05);
}

header.scrolled .btn-logout-nav:hover {
    background: #dc2626;
    color: white !important;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 50px;
}

header.scrolled .lang-switch {
    background: rgba(0, 0, 0, 0.05);
}

.lang-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background-color: var(--bg-surface);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

header.scrolled .lang-btn {
    color: var(--primary-color);
}

header.scrolled .lang-btn.active {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7)), url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: var(--header-height);
}

.hero-content {
    max-width: 900px;
    color: var(--text-light);
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Page Headers (Specific Images) */
.page-header {
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--text-light);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.6));
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
}

.header-contact {
    background-image: url('https://images.unsplash.com/photo-1596524430615-b46475ddff6e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.header-producers {
    background-image: url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.header-buyers {
    background-image: url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.header-calendar {
    background-image: url('https://images.unsplash.com/photo-1540575467063-17e6fc8c62d8?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

.header-about {
    background-image: url('https://images.unsplash.com/photo-1494412651409-ae1e355693eb?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
}

/* Forms */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info,
.contact-form {
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

/* Tables (Calendar) */
.calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.calendar-table th {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 600;
}

.calendar-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.calendar-table tr:hover td {
    background-color: #f8fafc;
}

.calendar-table tr:last-child td {
    border-bottom: none;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    text-align: center;
}

footer .logo {
    color: var(--text-light);
    margin-bottom: 1rem;
    display: inline-block;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
}

/* WhatsApp Button */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: #25D366;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

/* Page Specific: About */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-img {
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-text {
    flex: 1;
}

/* Page Specific: Buyers (Industry Grid) */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.industry-item {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.industry-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.industry-item h4 {
    margin-top: 1rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

/* Page Specific: Producers (Form Box) */
.form-box {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Utils & Animations */
.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--text-light);
        z-index: 1001;
    }

    header.scrolled .menu-toggle {
        color: var(--primary-color);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links li a {
        font-size: 1.25rem;
    }

    .lang-switch {
        margin-right: 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .page-header {
        height: 50vh;
    }
}

/* Auth Pages (Login & Signup) */
.auth-page {
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.6)),
        url('../images/izmir_port.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-page header:not(.scrolled) {
    background: transparent;
}

.auth-page header:not(.scrolled) .logo,
.auth-page header:not(.scrolled) .nav-links li a,
.auth-page header:not(.scrolled) .menu-toggle {
    color: var(--text-light);
}

.auth-page .login-container,
.auth-page .signup-container,
.auth-page .profile-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 1rem 60px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeUp 0.6s ease-out;
}

.signup-container .auth-card {
    max-width: 800px;
}

.auth-card h2 {
    margin-bottom: 2.5rem;
    text-align: center;
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: none !important;
}

.auth-card .form-group label {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-card .form-control {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid #e2e8f0;
}

.auth-card .form-control:focus {
    background: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(204, 164, 59, 0.15);
}

.auth-card .btn-auth {
    width: 100%;
    margin-top: 1rem;
    padding: 1.25rem;
    font-size: 1.1rem;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: var(--radius-md) !important;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.auth-card .btn-auth:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-card .link-text {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
}

.auth-card .link-text a {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .auth-card {
        padding: 2rem;
    }

    .auth-card h2 {
        font-size: 1.75rem;
    }
}

/* Conditional Fields for Signup */
.conditional-fields {
    display: none;
    margin-top: 1.5rem;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.03);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
    animation: fadeIn 0.4s ease;
}

.conditional-fields.active {
    display: block;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.form-section {
    margin-bottom: 3rem;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(204, 164, 59, 0.2);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.05);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.form-check:hover {
    background: rgba(15, 23, 42, 0.08);
}

.form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0;
}