/* ============================================
   Klay Klothing - CUSTOM STYLES
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: #04d3fd;  /* Bright Cyan Blue */
    --accent-color: #33dcfd;     /* Lighter Cyan Blue (10% lighter) */
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 10px 40px rgba(0, 0, 0, 0.2);
    /* Secondary color RGB for rgba usage */
    --secondary-rgb: 4, 211, 253;
}

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

/* Body Styles */
body {
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

p {
    font-weight: 400;
    letter-spacing: -0.01em;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--secondary-color);
    color: var(--text-dark);
}

::-moz-selection {
    background: var(--secondary-color);
    color: var(--text-dark);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(4, 211, 253, 0.3);
}

.btn-primary.text-sm {
    padding: 10px 24px;
    font-size: 14px;
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #2a2a3e;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(26, 26, 46, 0.3);
}

.btn-outline {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
}

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

/* ============================================
   CARDS
   ============================================ */

.card-hover {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

/* ============================================
   OVERLAYS & GRADIENTS
   ============================================ */

.gradient-overlay {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(var(--secondary-rgb), 0.8) 100%);
}

.dark-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   IMAGES
   ============================================ */

.zoom-image {
    overflow: hidden;
    border-radius: 8px;
}

.zoom-image img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zoom-image:hover img {
    transform: scale(1.1);
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 9999;
    overflow: hidden;
    visibility: hidden;
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu .flex.flex-col {
    min-height: 100%;
    height: 100%;
    width: 100%;
}

/* Ensure mobile menu content is properly sized */
.mobile-menu > .flex {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Mobile menu scrollable content area */
.mobile-menu .flex-1 {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile menu header - fixed at top */
.mobile-menu > .flex > div:first-child {
    flex-shrink: 0;
}

/* Ensure mobile menu covers entire screen on all devices */
@media (max-width: 1024px) {
    .mobile-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* ============================================
   SECTIONS
   ============================================ */

.section-padding {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 50px 0;
    }
}

/* ============================================
   LOADER
   ============================================ */

.loader {
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: rotate 1s linear infinite;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), 0.1);
}

.form-textarea {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    resize: vertical;
    min-height: 120px;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(var(--secondary-rgb), 0.1);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-medium);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--secondary-color), var(--accent-color)) 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 10px 24px;
        font-size: 14px;
    }
}


/* ============================================
   NAVBAR STYLES
   ============================================ */

#navbar {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#navbar.scrolled {
    background: rgba(26, 26, 46, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   NAVIGATION ACTIVE STATES
   ============================================ */

/* Desktop Navigation Active State */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

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

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

.nav-link.active {
    color: var(--secondary-color) !important;
}

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

/* Mobile Navigation Active State */
.mobile-nav-link.active {
    color: var(--secondary-color) !important;
    background: rgba(var(--secondary-rgb), 0.1);
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
}

.mobile-nav-link.active i {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* ============================================
   FLOATING WHATSAPP BUTTON
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    text-decoration: none;
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

.whatsapp-float i {
    animation: whatsapp-ring 1.5s ease-in-out infinite;
}

/* Tooltip */
.whatsapp-tooltip {
    position: absolute;
    left: 75px;
    background: rgba(26, 26, 46, 0.95);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

.whatsapp-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 6px 6px 6px 0;
    border-color: transparent rgba(26, 26, 46, 0.95) transparent transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Pulse Animation */
@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 
                    0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 
                    0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* Ring Animation */
@keyframes whatsapp-ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20%, 40% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

/* Notification Badge (Optional - for unread messages indicator) */
.whatsapp-float::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #FF3B30;
    border-radius: 50%;
    border: 3px solid white;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Remove badge if not needed - add this class to button */
.whatsapp-float.no-badge::after {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 20px;
        left: 20px;
        font-size: 28px;
    }
    
    .whatsapp-tooltip {
        display: none; /* Hide tooltip on mobile for better UX */
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        left: 15px;
        font-size: 26px;
    }
}

/* Alternative Style - Square with Rounded Corners */
.whatsapp-float.square {
    border-radius: 16px;
}

/* Alternative Position - Bottom Right */
.whatsapp-float.right {
    left: auto;
    right: 30px;
}

.whatsapp-float.right .whatsapp-tooltip {
    left: auto;
    right: 75px;
    transform: translateX(10px);
}

.whatsapp-float.right .whatsapp-tooltip::before {
    left: auto;
    right: -6px;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent rgba(26, 26, 46, 0.95);
}

.whatsapp-float.right:hover .whatsapp-tooltip {
    transform: translateX(0);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .whatsapp-tooltip {
        background: rgba(255, 255, 255, 0.95);
        color: var(--primary-color);
    }
    
    .whatsapp-tooltip::before {
        border-color: transparent rgba(255, 255, 255, 0.95) transparent transparent;
    }
    
    .whatsapp-float.right .whatsapp-tooltip::before {
        border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
    }
}

/* Accessibility - Focus States */
.whatsapp-float:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 4px;
}

.whatsapp-float:focus:not(:focus-visible) {
    outline: none;
}

/* Print Media - Hide button when printing */
@media print {
    .whatsapp-float {
        display: none !important;
    }
}

/* ============================================
   NAVBAR STYLES
   ============================================ */

#navbar {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
}

#navbar.scrolled {
    background: rgba(26, 26, 46, 0.98);
    box-shadow: var(--shadow-medium);
}

/* ============================================
   TEXT UTILITY - SECONDARY COLOR
   ============================================ */

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-secondary\/10 {
    background-color: rgba(var(--secondary-rgb), 0.1) !important;
}

.bg-secondary\/20 {
    background-color: rgba(var(--secondary-rgb), 0.2) !important;
}

.bg-secondary {
    color: var(--secondary-color) !important;
}

/* ============================================
   PORTFOLIO & FILTER STYLES
   ============================================ */

.filter-btn {
    background: white;
    color: var(--text-dark);
    border: 2px solid #e5e5e5;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.filter-btn.active {
    background: var(--secondary-color);
    color: var(--text-dark);
    border-color: var(--secondary-color);
}

.portfolio-item {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-backdrop,
#portfolio-modal,
#inquiry-modal {
    backdrop-filter: blur(8px);
}

#portfolio-modal.flex,
#inquiry-modal.flex {
    display: flex;
}

/* ============================================
   FAQ STYLES
   ============================================ */

.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    transition: all 0.3s ease;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-answer {
    transition: max-height 0.3s ease;
}

.faq-answer.active {
    max-height: 1000px;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

#scroll-top,
.scroll-top-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
    cursor: pointer;
    border: none;
}

#scroll-top.visible,
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-top:hover,
.scroll-top-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 10px 25px rgba(var(--secondary-rgb), 0.3);
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

#cookie-consent {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--secondary-color);
}

#cookie-consent a {
    text-decoration: underline;
    transition: color 0.2s ease;
}

#cookie-consent a:hover {
    color: var(--accent-color);
}

/* Adjust scroll-to-top button when cookie banner is visible */
body:has(#cookie-consent:not([style*="display: none"])) #scroll-top,
body:has(#cookie-consent:not([style*="display: none"])) .scroll-top-btn {
    bottom: 180px;
}

@media (max-width: 768px) {
    body:has(#cookie-consent:not([style*="display: none"])) #scroll-top,
    body:has(#cookie-consent:not([style*="display: none"])) .scroll-top-btn {
        bottom: 220px;
    }
}

/* ============================================
   IMAGE OPTIMIZATION
   ============================================ */

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

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}