/* 
 * Padel Court Manufacturer - Premium Design System 
 */

:root {
    /* Colors */
    --primary-blue: #1E66D6;
    --primary-dark: #134FAE;
    --accent-green: #6F9E2E;
    --dark-bg: #F2F7FF;
    --dark-surface: #FFFFFF;
    --light-text: #1A2A44;
    --dim-text: #5B6B85;
    --white: #122540;

    /* Typography */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Spacing */
    --container-width: 1280px;
    --header-height: 80px;

    /* Transitions */
    --transition-fast: 0.3s ease;
}

/* Base Setup */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--white);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-accent {
    color: var(--accent-green);
}

.text-blue {
    color: var(--primary-blue);
}

.text-center {
    text-align: center;
}

.mb-5 {
    margin-bottom: 3rem;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 87, 217, 0.4);
}

.btn-outline {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.7);
}

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

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(18, 37, 64, 0.08);
}

.nav {
    height: 100%;
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--white);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-blue);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dim-text);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-green);
    transition: width 0.3s ease;
}

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

/* Footer */
.footer {
    background-color: #EAF1FB;
    padding: 80px 0 30px;
    margin-top: auto;
    border-top: 1px solid rgba(18, 37, 64, 0.08);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--dim-text);
    margin-top: 20px;
    max-width: 300px;
}

.brand-subline {
    margin-top: 16px;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.6;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--white);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--dim-text);
}

.footer-links a:hover {
    color: var(--primary-blue);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(18, 37, 64, 0.08);
    color: var(--dim-text);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Mobile menu to be implemented */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    margin-left: 24px;
    z-index: 1001;
    /* Above other nav items */
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(18, 37, 64, 0.2);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover,
.lang-btn.active {
    border-color: var(--primary-blue);
    background: rgba(30, 102, 214, 0.08);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--dark-surface);
    border: 1px solid rgba(18, 37, 64, 0.12);
    border-radius: 6px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 40px rgba(18, 37, 64, 0.16);
    padding: 8px 0;
}

.lang-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    padding: 10px 20px;
    color: var(--dim-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
    font-size: 0.95rem;
}

.lang-option:hover {
    background: rgba(30, 102, 214, 0.08);
    color: var(--white);
    padding-left: 24px;
    /* Subtle slide effect */
}

.lang-option.selected {
    color: var(--accent-green);
    background: rgba(111, 158, 46, 0.15);
}

.flag {
    font-size: 1.2rem;
    line-height: 1;
}

/* RTL adjustment for Arabic */
[dir="rtl"] .lang-menu {
    right: auto;
    left: 0;
}

/* Customization Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(18, 37, 64, 0.35);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--dark-surface);
    margin: auto;
    padding: 30px;
    border: 1px solid rgba(18, 37, 64, 0.12);
    width: 90%;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 15px 40px rgba(18, 37, 64, 0.18);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: var(--dim-text);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-blue);
    text-decoration: none;
}

.modal-body {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.modal-preview {
    position: relative;
    background: #fff;
    /* Optional: depending on image transparency */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.modal-preview img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.logo-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-overlay img {
    height: 30px;
    width: auto;
}

.logo-text {
    color: #000;
    font-weight: bold;
    font-family: var(--font-heading);
}

.modal-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.option-group h4 {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--dim-text);
}

.color-options {
    display: flex;
    gap: 12px;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.color-circle:hover {
    transform: scale(1.1);
}

.color-circle.selected {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--primary-blue);
}

.toggle-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.toggle-control label {
    cursor: pointer;
}

.text-sm {
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-preview {
        min-height: 200px;
    }
}
