* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00a67e;
    --primary-dark: #008566;
    --secondary-color: #4facfe;
    --accent-color: #66bb6a;
    --dark: #1a2332;
    --light: #f0f8ff;
    --white: #ffffff;
    --gray: #6c7a89;
    --danger: #ffa726;
    --success: #51cf66;
    --warning: #ffd43b;
    --info: #4dabf7;
    --gradient-1: linear-gradient(135deg, #00a67e 0%, #4facfe 100%);
    --gradient-2: linear-gradient(135deg, #00a67e 0%, #4facfe 100%);
    --gradient-3: linear-gradient(135deg, #51cf66 0%, #00a67e 100%);
    --gradient-4: linear-gradient(135deg, #66bb6a 0%, #ffa726 100%);
    --shadow-sm: 0 2px 8px rgba(0, 166, 126, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 166, 126, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 166, 126, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #333;
    direction: rtl;
    font-size: 16px;
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 166, 126, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.6rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-wrapper:hover {
    transform: translateY(-1px);
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #334155;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.6rem 1.1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.nav-links a.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.auth-buttons {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.user-menu {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.user-menu span,
.user-menu #userName {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #00a67e 0%, #4facfe 100%);
    border-radius: 10px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 166, 126, 0.3);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.user-menu span:hover,
.user-menu #userName:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 166, 126, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Buttons */
.btn {
    padding: 0.5rem 1.2rem;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::before {
    width: 250px;
    height: 250px;
}

.btn-primary {
    background: #10b981;
    color: white;
    padding: 0.7rem 1.6rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: #1e293b;
    color: white;
    padding: 0.7rem 1.6rem;
    box-shadow: 0 4px 14px rgba(30, 41, 59, 0.2);
}

.btn-secondary:hover {
    background: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 41, 59, 0.3);
}

.btn-logout {
    background: linear-gradient(135deg, #00a67e 0%, #4facfe 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 166, 126, 0.3);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 166, 126, 0.4);
}

.btn-large {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.btn-white {
    background: var(--white);
    color: var(--primary-color);
}

.btn-white:hover {
    background: var(--light);
}

/* Hero Section */
.hero {
    background: var(--gradient-2);
    color: var(--white);
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    animation: float 20s infinite linear;
    z-index: 2;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-100px); }
}

.hero-content {
    position: relative;
    z-index: 3;
    animation: fadeInUp 1s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    padding-bottom: 2rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.scroll-down {
    margin-top: 2rem;
    color: var(--white);
    cursor: pointer;
    animation: bounce 2s infinite;
    transition: transform 0.3s ease;
    opacity: 0.9;
}

.scroll-down:hover {
    transform: translateY(5px);
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    background: var(--light);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 5px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 166, 126, 0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 166, 126, 0.25);
    border-top-color: var(--secondary-color);
    border-top-width: 6px;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.feature-card p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--gray);
}

/* Stats Section */
.stats {
    background: var(--gradient-1);
    color: var(--white);
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.stats::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(45deg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

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

.stat-item h3 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.2rem;
}

/* CTA Section */
.cta {
    background: var(--gradient-4);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Forms */
.form-container {
    max-width: 550px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--white);
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 166, 126, 0.15);
    border-top: 6px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    height: 6px;
    background: var(--gradient-2);
}

.form-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.7rem;
    color: var(--dark);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 166, 126, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid var(--success);
    box-shadow: var(--shadow-sm);
}

.alert-danger {
    background: linear-gradient(135deg, #ffe0e0 0%, #ffc9c9 100%);
    color: #c92a2a;
    border-left: 4px solid var(--danger);
    box-shadow: var(--shadow-sm);
}

.alert-info {
    background: linear-gradient(135deg, #d0ebff 0%, #a5d8ff 100%);
    color: #1864ab;
    border-left: 4px solid var(--info);
    box-shadow: var(--shadow-sm);
}

/* Responsive Navbar */
@media (max-width: 1024px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .logo h2 {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 0.2rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
        padding: 0.4rem 0.7rem;
    }
    
    .user-menu span {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
    
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 0.3rem;
        padding-top: 0.5rem;
        border-top: 2px solid rgba(0, 166, 126, 0.1);
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .logo h2 {
        font-size: 1.1rem;
    }
    
    .nav-links a {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    .user-menu {
        gap: 0.4rem;
    }
    
    .user-menu span {
        display: none;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* Logo Animations */
@keyframes logoFloat {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

@keyframes logoGlowHover {
  0%, 100% { filter: drop-shadow(0 0 0px #00a67e); }
  50% { filter: drop-shadow(0 0 16px #00a67e); }
}

.navbar .logo-wrapper {
  transition: none;
}

.navbar .logo-wrapper:hover .logo-img {
  box-shadow: 0 4px 24px 0 rgba(0,166,126,0.18);
  /* no scale, just shadow */
}

/* --- GLOBAL MOBILE RESPONSIVENESS UTILITIES --- */
.responsive-grid-2 {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
}

.responsive-grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .responsive-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    .responsive-grid-equal {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

.mobile-flex-wrap {
    display: flex;
    flex-wrap: wrap;
}

.w-full-mobile {
    width: auto;
}

@media (max-width: 768px) {
    .w-full-mobile {
        width: 100% !important;
    }
}

/* --- NAVBAR MOBILE FIX --- */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #1e293b;
    cursor: pointer;
    padding: 5px;
}

.nav-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: flex-end;
}

@media (max-width: 1024px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
    }
    
    .navbar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu-wrapper {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        display: none;
        padding-top: 15px;
        gap: 15px;
    }
    
    .nav-menu-wrapper.open {
        display: flex;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        border-top: none;
        padding-top: 0;
        align-items: stretch;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 12px;
        background: #f8fafc;
        border-radius: 8px;
        text-align: right;
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }
    
    .auth-buttons .btn {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
}

/* --- TRIPS SIDEBAR LAYOUT --- */
.trips-sidebar-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .trips-sidebar-layout {
        grid-template-columns: 1fr;
    }
}

/* --- TRIP TEMPLATE LAYOUT --- */
.trip-template-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .trip-template-layout {
        grid-template-columns: 1fr;
    }
}
