/* ==========================================
   Base Styles - TaHa Travel Agency
   ========================================== */

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

/* HTML & Body */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
    overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--text-heading);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--primary-dark);
}

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

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-2xl { max-width: var(--container-2xl); }

/* Section */
.section {
    padding: var(--space-20) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-subtitle {
    display: inline-block;
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--secondary-color);
    margin-bottom: var(--space-3);
    position: relative;
}

.section-subtitle::before,
.section-subtitle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
}

.section-subtitle::before {
    right: calc(100% + 15px);
}

.section-subtitle::after {
    left: calc(100% + 15px);
}

.section-title {
    font-size: var(--fs-4xl);
    margin-bottom: var(--space-4);
}

.section-description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-xs);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--fs-base);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--fs-xs);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg);
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* Social Chat Float Button */
.chat-float-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9998;
}

.chat-float-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    animation: floatPulse 2s ease-in-out infinite;
}

@keyframes floatPulse {
    0%, 100% { box-shadow: 0 5px 25px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 8px 40px rgba(102, 126, 234, 0.7); }
}

.chat-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 35px rgba(102, 126, 234, 0.6);
}

.chat-float-btn .fa-times {
    display: none;
}

.chat-float-wrapper.active .chat-float-btn .fa-comment-dots {
    display: none;
}

.chat-float-wrapper.active .chat-float-btn .fa-times {
    display: block;
}

.chat-float-wrapper.active .chat-float-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    transform: rotate(90deg);
    animation: none;
}

/* Chat Options */
.chat-options {
    position: absolute;
    bottom: 75px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-float-wrapper.active .chat-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 50px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.chat-float-wrapper.active .chat-option {
    transform: translateX(0);
    opacity: 1;
}

.chat-float-wrapper.active .chat-option:nth-child(1) {
    transition-delay: 0.1s;
}

.chat-float-wrapper.active .chat-option:nth-child(2) {
    transition-delay: 0.2s;
}

.chat-float-wrapper.active .chat-option:nth-child(3) {
    transition-delay: 0.3s;
}

.chat-option i {
    font-size: 1.3rem;
}

.chat-option.messenger {
    background: linear-gradient(135deg, #0084ff, #00c6ff);
}

.chat-option.messenger:hover {
    background: linear-gradient(135deg, #0073e6, #00b3e6);
    transform: translateX(5px);
}

.chat-option.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.chat-option.whatsapp:hover {
    background: linear-gradient(135deg, #20bd5a, #0f7a6d);
    transform: translateX(5px);
}

.chat-option.instagram {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.chat-option.instagram:hover {
    background: linear-gradient(135deg, #e08529, #d55d35, #c9223c, #b91f5c, #a8157a);
    transform: translateX(5px);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-spinner {
    width: 80px;
    height: 80px;
    animation: spinLogo 1.5s linear infinite;
}

.preloader-spinner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.preloader-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #44734c;
    letter-spacing: 2px;
}

.preloader-text .dot {
    animation: dotBounce 1.4s infinite ease-in-out;
}

.preloader-text .dot:nth-child(1) {
    animation-delay: 0s;
}

.preloader-text .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.preloader-text .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes spinLogo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes dotBounce {
    0%, 80%, 100% { opacity: 0; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-5px); }
}

.loader {
    position: relative;
    width: 100px;
    height: 100px;
}

.loader svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.loader .circle-bg {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 4;
}

.loader .circle-progress {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: loader-progress 1.5s ease-in-out infinite;
}

.loader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--fs-2xl);
    color: var(--primary-color);
    animation: loader-bounce 1.5s ease-in-out infinite;
}

@keyframes loader-progress {
    0% { stroke-dashoffset: 283; }
    50% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 283; }
}

@keyframes loader-bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

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

.fw-light { font-weight: var(--fw-light); }
.fw-normal { font-weight: var(--fw-regular); }
.fw-medium { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold { font-weight: var(--fw-bold); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.my-0 { margin-top: 0; margin-bottom: 0; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

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

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