/* Custom styles for Red Apple Agency */

/* Brand Colors - Premium Red, White, Black */
:root {
    --red-primary: #d81f26;
    --red-dark: #b01a1f;
    --red-light: #e63946;
    --red-rgb: 216, 31, 38;
    --white: #ffffff;
    --black: #000000;
    --gray-dark: #1a1a1a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-medium: #2d2d2d;
    --gray-light: #f5f5f5;
    
    /* Premium Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    --shadow-red: 0 10px 30px rgba(216, 31, 38, 0.3);
    
    /* Premium Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
}

/* LINESeedSansTH Font Face Declarations */
@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../../font/LINESeedSansTH_W_Th.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Th.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../../font/LINESeedSansTH_W_Rg.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Rg.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../../font/LINESeedSansTH_W_Bd.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_Bd.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../../font/LINESeedSansTH_W_He.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_He.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../../font/LINESeedSansTH_W_XBd.woff2') format('woff2'),
         url('../../font/LINESeedSansTH_W_XBd.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Apply LINESeedSansTH as default font - Premium Typography */
body {
    font-family: 'LINESeedSansTH', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--black);
    background-color: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Premium Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p {
    letter-spacing: 0.01em;
}

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

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

::-webkit-scrollbar-track {
    background: var(--white);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #b01a1f;
}

/* Custom focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.1);
}

/* Animation for fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Button hover effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--red-rgb), 0.3);
}

/* Hero section bird animations */
@keyframes fly {
    0% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(20px) translateY(-10px);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

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

/* Hero banner now uses a single responsive image in index.php
   No extra CSS needed beyond Tailwind classes */

/* City skyline gradient effect */
.city-skyline {
    background: linear-gradient(to top, rgba(75, 85, 99, 0.2) 0%, transparent 100%);
}

/* Hero section with background image */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* Badge styling */
.hero-badge {
    font-family: 'Brush Script MT', 'Brush Script Std', cursive;
    font-style: italic;
}

/* Logo banner in navigation - Shield/Banner shape with pointed bottom */
.logo-banner-shield {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 25px), 50% 100%, 0 calc(100% - 25px));
    background: var(--red-primary);
    position: relative;
    z-index: 20;
    min-width: 320px;
    padding-bottom: 50px !important;
}

/* RED APPLE Typography Style - Netflix Inspired */
.red-apple-logo {
    font-family: 'LINESeedSansTH', sans-serif;
}

.red-apple-logo .red-text {
    font-weight: 900;
    font-style: normal;
    color: var(--white);
    letter-spacing: -0.02em;
}

.red-apple-logo .apple-text {
    font-weight: 300;
    font-style: italic;
    color: var(--white);
    -webkit-text-stroke: 1.5px var(--white);
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.01em;
    text-stroke: 1.5px var(--white);
}

/* Override Tailwind red colors with brand color */
.bg-red-600,
.bg-red-700,
.bg-red-500,
.bg-red-brand {
    background-color: var(--red-primary) !important;
}

.text-red-600,
.text-red-700,
.text-red-500,
.text-red-brand {
    color: var(--red-primary) !important;
}

.border-red-600,
.border-red-700,
.border-red-500,
.border-red-brand {
    border-color: var(--red-primary) !important;
}

.hover\:bg-red-700:hover,
.hover\:bg-red-600:hover {
    background-color: #b01a1f !important;
}

.hover\:text-red-700:hover,
.hover\:text-red-600:hover {
    color: #b01a1f !important;
}

/* Red variations for backgrounds */
.bg-red-50 {
    background-color: rgba(var(--red-rgb), 0.05) !important;
}

.bg-red-100 {
    background-color: rgba(var(--red-rgb), 0.1) !important;
}

.border-red-100 {
    border-color: rgba(var(--red-rgb), 0.1) !important;
}

.border-red-300 {
    border-color: rgba(var(--red-rgb), 0.3) !important;
}

.text-red-100 {
    color: rgba(var(--red-rgb), 0.9) !important;
}

/* Brand color utilities */
.bg-red-brand {
    background-color: var(--red-primary) !important;
}

.text-red-brand {
    color: var(--red-primary) !important;
}

.border-red-brand {
    border-color: var(--red-primary) !important;
}

/* Ensure logo extends below the nav bar */
nav.bg-red-600 {
    overflow: visible;
}

/* Add spacing below nav for logo extension */
body > nav + * {
    margin-top: 0;
}

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

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

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

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

/* Service cards hover effect */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Feature cards */
.feature-card {
    transition: all 0.3s ease;
}

/* Testimonial cards */
.testimonial-card {
    transition: all 0.3s ease;
}

/* Process steps */
.process-step {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Counter animation */
.counter {
    transition: all 0.3s ease;
}

/* Portfolio items */
.portfolio-item {
    transition: all 0.3s ease;
}

/* Team members */
.team-member {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.team-member.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pricing cards */
.pricing-card {
    transition: all 0.3s ease;
}

/* Case study items */
.case-study-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.case-study-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Client Logo Slider Animation */
@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.client-logo-slider-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.client-logo-slider {
    display: flex;
    width: fit-content;
    animation: slide 40s linear infinite;
    will-change: transform;
}

.client-logo-slider-wrapper:hover .client-logo-slider {
    animation-play-state: paused;
}

/* Services Carousel */
.services-carousel-wrapper {
    position: relative;
    padding: 0 60px;
}

.services-carousel-container {
    overflow: hidden;
    position: relative;
}

.services-carousel-slide {
    transition: transform 0.5s ease-in-out;
}

@media (max-width: 767px) {
    .services-carousel-wrapper {
        padding: 0 20px;
    }
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Slow pulse animation for premium icons */
@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 18px 30px rgba(216, 31, 38, 0.35);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 2.5s ease-in-out infinite;
}

/* Services slider black-red frame effect */
.service-frame {
    position: relative;
    background: linear-gradient(135deg, #000000, #d81f26);
    padding: 3px;
    border-radius: 1.6rem;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.service-frame > img,
.service-frame > div,
.service-frame > a {
    border-radius: 1.4rem;
}

.service-frame::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 1.4rem;
    border: 1px dashed rgba(0, 0, 0, 0.45);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-frame:hover::before {
    opacity: 1;
}

.service-frame:hover {
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.7),
        0 0 0 5px rgba(216, 31, 38, 0.9),
        0 18px 35px rgba(0, 0, 0, 0.45);
    transform: translateY(-4px);
}

/* Portfolio Modal */
#portfolioModal {
    backdrop-filter: blur(8px);
}

/* Premium Override - Replace all gray with black/white/red */
.text-gray-800,
.text-gray-900 {
    color: var(--black) !important;
}

.text-gray-700 {
    color: var(--gray-dark) !important;
}

.text-gray-600 {
    color: var(--black) !important;
    opacity: 0.8;
}

.text-gray-500,
.text-gray-400 {
    color: var(--black) !important;
    opacity: 0.6;
}

.bg-gray-50,
.bg-gray-100 {
    background-color: var(--white) !important;
}

.bg-gray-200,
.bg-gray-300 {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

.border-gray-200,
.border-gray-300 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.border-gray-100 {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Premium Section Headings */
section h2 {
    font-weight: 900 !important;
    letter-spacing: -0.03em !important;
    color: var(--black) !important;
}

section.bg-red-600 h2,
section.premium-section-red h2 {
    color: var(--white) !important;
}

/* Premium Cards */
.premium-card,
.feature-card,
.service-card,
.portfolio-item,
.testimonial-card,
.news-item {
    background: var(--white) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: var(--shadow-md) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.premium-card:hover,
.feature-card:hover,
.service-card:hover,
.portfolio-item:hover,
.testimonial-card:hover,
.news-item:hover {
    box-shadow: var(--shadow-xl) !important;
    transform: translateY(-4px) !important;
    border-color: var(--red-primary) !important;
}

/* Premium Buttons */
.bg-red-600,
.bg-red-700 {
    background: var(--red-primary) !important;
    box-shadow: var(--shadow-red) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bg-red-600:hover,
.bg-red-700:hover {
    background: var(--red-dark) !important;
    box-shadow: var(--shadow-2xl) !important;
    transform: translateY(-2px) !important;
}

/* Premium Text Colors */
.text-red-600,
.text-red-700 {
    color: var(--red-primary) !important;
}

/* Premium Background Gradients */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--red-primary), var(--red-dark)) !important;
}

/* Premium Shadows */
.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.shadow-xl {
    box-shadow: var(--shadow-xl) !important;
}

.shadow-2xl {
    box-shadow: var(--shadow-2xl) !important;
}
