/* Variables CSS */
:root {
    --color-primary: #8c1a17;
    --color-secondary: #e4dbb4;
    --color-white: #ffffff;
    --color-black: #000000;
    --bg-light: #ffffff;
    --bg-dark: #1a1a1a;
    --text-light: #333333;
    --text-dark: #ffffff;
    --card-light: #ffffff;
    --card-dark: #2a2a2a;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-color: var(--bg-dark);
    --text-color: var(--text-dark);
    --card-bg: var(--card-dark);
}

[data-theme="light"] {
    --bg-color: var(--bg-light);
    --text-color: var(--text-light);
    --card-bg: var(--card-light);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* Utility Classes */
.bg-primary {
    background-color: var(--color-primary) !important;
}

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

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

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

.bg-alternate {
    background-color: rgba(228, 219, 180, 0.1);
}

[data-theme="dark"] .bg-alternate {
    background-color: rgba(42, 42, 42, 0.5);
}

[data-theme="dark"] .text-three {
    color: var(--color-white) !important;
}

/* Navigation */
#navbar {
    background: linear-gradient(135deg, var(--color-primary), #6d1513);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Hero Pattern */
.hero-pattern {
    background-image:
            repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.05) 35px, rgba(255,255,255,.05) 70px);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(140, 26, 23, 0.1);
}

[data-theme="dark"] .card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border-color: rgba(228, 219, 180, 0.2);
}

.card:hover {
    box-shadow: 0 10px 20px rgba(140, 26, 23, 0.2);
    transform: translateY(-2px);
}

/* Hover Effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(140, 26, 23, 0.3);
}

/* Section Padding */
.section-padding {
    padding: 6rem 0;
}

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

/* Section Titles */
.section-title {
    position: relative;
    display: inline-block;
}

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

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

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

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

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

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

/* Input Styles */
.bg-input {
    background-color: var(--card-bg);
    border-color: rgba(140, 26, 23, 0.2);
    color: var(--text-color);
}

[data-theme="dark"] .bg-input {
    border-color: rgba(228, 219, 180, 0.3);
}

.bg-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(140, 26, 23, 0.1);
}

/* Value Cards */
.value-card {
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.value-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(140, 26, 23, 0.25);
}

.value-card i {
    transition: transform 0.3s ease;
}

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

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card i {
    transition: all 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.15) rotate(-5deg);
    color: var(--color-primary);
}

/* Telecom Cards */
.telecom-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.telecom-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-secondary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.telecom-card:hover::after {
    transform: scaleX(1);
}

.telecom-card i {
    transition: all 0.3s ease;
}

.telecom-card:hover i {
    transform: scale(1.2);
    color: var(--color-secondary);
}

/* Equipment Cards */
.equipment-card {
    background: var(--card-bg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.equipment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(228, 219, 180, 0.2), transparent);
    transition: left 0.5s ease;
}

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

.equipment-card i {
    transition: all 0.3s ease;
}

.equipment-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* Reference Cards */
.reference-card {
    background: var(--card-bg);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.reference-card:hover {
    border-color: var(--color-primary);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(140, 26, 23, 0.3);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before,
.btn-secondary::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.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* Scroll to Top Button */
#scrollTop {
    transition: all 0.3s ease;
}

#scrollTop:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(140, 26, 23, 0.4);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Mobile Menu */
#mobileMenu {
    transition: all 0.3s ease;
}

#mobileMenu.show {
    display: block;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Image Hover Effect */
img {
    transition: all 0.3s ease;
}

img:hover {
    transform: scale(1.05);
}



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

::-moz-selection {
    background: var(--color-primary);
    color: white;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* 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;
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(228, 219, 180, 0.3);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: white;
    border-radius: 0.5rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 0.5rem;
}

.tooltip:hover::before {
    opacity: 1;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: white;
    background-color: var(--color-primary);
    border-radius: 0.25rem;
}

/* Alert */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .section-padding {
        padding: 4rem 0;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 640px) {
    .section-padding {
        padding: 3rem 0;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--color-primary);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] img {
    opacity: 0.9;
}

[data-theme="dark"] .text-gray-600 {
    color: #9ca3af !important;
}

[data-theme="dark"] .text-gray-300 {
    color: #d1d5db !important;
}

[data-theme="dark"] .border {
    border-color: rgba(228, 219, 180, 0.2) !important;
}

/* Logo Container */
.logo-container {
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

/* Nav Link Active State */
.nav-link.active {
    color: var(--color-secondary) !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-secondary);
}

/* Mobile Nav Link */
.mobile-nav-link.active {
    color: var(--color-secondary) !important;
    border-left: 3px solid var(--color-secondary);
    padding-left: 1rem;
}

/* Form Focus */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(140, 26, 23, 0.1) !important;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    box-shadow: 0 0 0 3px rgba(228, 219, 180, 0.2) !important;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

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

/* Error Message */
.error-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #ef4444;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}
