/* Custom Styles for IronNet Security Systems */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus {
    outline: none !important;
}

*:focus-visible {
    outline: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Font weight optimizations */
h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Button and link styles */
button, .btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

a {
    font-family: 'Inter', sans-serif;
}

/* Navigation */
nav {
    font-family: 'Inter', sans-serif;
}

nav a {
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Utility classes */
.font-extrabold {
    font-weight: 900;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.font-normal {
    font-weight: 400;
}

.font-light {
    font-weight: 300;
}

/* Specific sections */
.service-card h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.product-card h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.project-card h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Form elements */
input, textarea, select {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

/* Footer */
footer {
    font-family: 'Inter', sans-serif;
}

footer h3, footer h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Hero Slider */
.hero-slide {
    opacity: 0;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slider-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.slider-dot.active {
    background-color: white;
    width: 1.5rem;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

/* Mobile dot sizes */
@media (max-width: 639px) {
    .slider-dot {
        width: 8px;
        height: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .slider-dot.active {
        width: 20px;
        box-shadow: 0 1px 6px rgba(255, 255, 255, 0.3);
    }
}

/* Hero text animations */
.hero-slide.active h1 {
    animation: slideInLeft 0.8s ease-out;
}

.hero-slide.active p {
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-slide.active a {
    animation: slideInLeft 1.2s ease-out 0.4s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slider navigation buttons */
#prev-slide,
#next-slide {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#prev-slide:hover,
#next-slide:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#prev-slide:active,
#next-slide:active {
    transform: translateY(-50%) scale(0.95);
}

/* Hide navigation buttons on mobile and tablet */
@media (max-width: 1023px) {
    #prev-slide,
    #next-slide {
        display: none !important;
    }
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: #2563eb;
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.product-card > div:last-child {
    margin-top: auto;
}

/* Ensure product description takes available space */
.product-card p {
    flex-grow: 1;
}

/* Price section always at bottom */
.product-card .flex.justify-between.items-center {
    margin-top: auto;
}

.product-card:hover {
    transform: translateY(-8px);
}

/* Project Cards */
.project-card {
    cursor: pointer;
}

/* Contact Form */
#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
}

.form-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Mobile Menu */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Smooth transitions */
a, button {
    transition: all 0.3s ease;
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navigation active state */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-slide h1 {
        font-size: 2.5rem;
    }
    
    .hero-slide p {
        font-size: 1.125rem;
    }
}

/* Print styles */
@media print {
    nav, footer, #iletisim {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Remove default browser focus outline */
*:focus {
    outline: none;
}

/* Custom focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    transition: box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Product filter active state */
.filter-btn.active {
    background-color: #2563eb !important;
    color: white !important;
    border-color: #2563eb !important;
}

/* Product item transitions */
.product-item {
    transition: all 0.3s ease;
}

.product-item.hidden {
    display: none;
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Extra small mobile (< 375px) */
@media (max-width: 374px) {
    /* Very small screens */
    .hero-slide h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    .hero-slide p {
        font-size: 0.875rem !important;
    }
    
    .hero-slide a {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    nav .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .product-card {
        min-height: 360px;
    }
}

/* Mobile optimizations (< 640px) */
@media (max-width: 639px) {
    /* Typography scaling */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.125rem !important;
    }
    
    h4 {
        font-size: 1rem !important;
    }
    
    /* Hero section - mobile optimized */
    .hero-slide {
        min-height: 600px;
    }
    
    .hero-slide h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-slide p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-slide a {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Slider controls */
    .slider-dot {
        width: 10px !important;
        height: 10px !important;
    }
    
    .slider-dot.active {
        width: 24px !important;
    }
    
    /* Product cards */
    .product-card {
        min-height: 380px;
    }
    
    .product-card h3 {
        font-size: 1rem !important;
    }
    
    .product-card p {
        font-size: 0.875rem !important;
        line-height: 1.5;
    }
    
    .product-card .text-2xl {
        font-size: 1.5rem !important;
    }
    
    /* Navigation */
    nav .text-2xl {
        font-size: 1.5rem !important;
    }
    
    nav .h-20 {
        height: 70px !important;
    }
    
    /* Spacing adjustments */
    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Contact form */
    #contact-form input,
    #contact-form textarea {
        font-size: 16px !important;
        padding: 0.75rem !important;
    }
    
    #contact-form button {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    
    /* Grid adjustments */
    .grid {
        gap: 1rem !important;
    }
    
    .gap-8 {
        gap: 1.5rem !important;
    }
    
    .gap-12 {
        gap: 2rem !important;
    }
    
    /* Footer */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    footer h3 {
        font-size: 1.5rem !important;
    }
    
    footer h4 {
        font-size: 1.125rem !important;
    }
    
    /* 404 page */
    .text-8xl {
        font-size: 4rem !important;
    }
    
    .text-9xl {
        font-size: 5rem !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
    }
    
    /* About section stats */
    .text-center.p-6 {
        padding: 1rem !important;
    }
    
    /* Service cards */
    .service-card {
        padding: 1.5rem !important;
    }
    
    /* Mobile menu */
    #mobile-menu {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    /* Breadcrumb */
    .text-sm {
        font-size: 0.875rem !important;
    }
    
    /* Product detail page */
    .aspect-square {
        aspect-ratio: 1 / 1;
    }
    
    .sticky {
        position: relative !important;
    }
}

/* Tablet optimizations (640px - 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
    /* Hero section */
    .hero-slide h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-slide p {
        font-size: 1.125rem !important;
    }
    
    .hero-slide a {
        padding: 1rem 2rem !important;
        font-size: 1.125rem !important;
    }
    
    /* Product grid */
    .product-card {
        min-height: 400px;
    }
    
    /* Services grid - 2 columns on tablet */
    .grid.lg\\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Typography */
    h2 {
        font-size: 2rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    /* Spacing */
    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* Medium screens (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .hero-slide h1 {
        font-size: 3.5rem !important;
    }
    
    .hero-slide p {
        font-size: 1.25rem !important;
    }
    
    .product-card {
        min-height: 420px;
    }
}

/* Large screens (> 1280px) */
@media (min-width: 1280px) {
    /* Container max width */
    .max-w-7xl {
        max-width: 1400px;
    }
    
    /* Hero section */
    .hero-slide h1 {
        font-size: 4.5rem !important;
    }
}

/* Landscape mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
    /* Reduce vertical spacing */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Hero section height adjustment */
    .hero-slide {
        min-height: 100vh;
    }
    
    /* Navigation height */
    nav .h-20 {
        height: 60px !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    button,
    a,
    .filter-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .product-card:hover {
        transform: none;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    /* Active states instead */
    .product-card:active {
        transform: scale(0.98);
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    button,
    a {
        border: 2px solid currentColor;
    }
    
    .product-card,
    .service-card {
        border: 2px solid #000;
    }
}

/* ============================================
   FLOATING BUTTONS & ANIMATIONS
   ============================================ */

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    border-radius: 50px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float i {
    font-size: 28px;
}

.whatsapp-float:hover {
    background: #20BA5A;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

.whatsapp-text {
    white-space: nowrap;
}

/* Mobile WhatsApp Button */
@media (max-width: 639px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .whatsapp-float i {
        font-size: 24px;
    }
    
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-float {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.scroll-top-btn:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.scroll-top-btn:active {
    transform: translateY(-1px);
}

@media (max-width: 639px) {
    .scroll-top-btn {
        bottom: 90px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: white;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Hide loader after page load */
body.loaded .page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
