/* ===============================================
   Modern Footer Styles
   =============================================== */

/* Prevent horizontal scroll */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

:root {
    --footer-bg: #2d3f52;
    --footer-bg-dark: #1a2634;
    --footer-bg-light: #3d5268;
    --footer-text: #ffffff;
    --footer-text-light: #e8f0f7;
    --footer-primary: #4ade80;
    --footer-primary-light: #86efac;
    --footer-border: #4a5e73;
    --footer-hover: #5eead4;
    --footer-link: #67e8f9;
}

/* Main Footer */
.modern-footer {
    background: linear-gradient(180deg, var(--footer-bg) 0%, var(--footer-bg-dark) 100%);
    color: var(--footer-text);
    padding: 0;
    margin: 4rem 0 0 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--footer-primary) 0%, var(--footer-primary-light) 50%, var(--footer-primary) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 0%;
    }
}

/* Footer Top */
.footer-top {
    width: 100%;
    padding: 4rem 1.5rem 3rem;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Footer Section */
.footer-section {
    animation: fadeInUp 0.8s ease-out backwards;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

/* Footer Logo */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(45, 122, 62, 0.3);
    transition: transform 0.3s ease;
}

.footer-logo:hover img {
    transform: rotate(360deg) scale(1.1);
}

.footer-logo h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--footer-text);
    margin: 0;
}

/* Footer Description */
.footer-description {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--footer-text-light);
    margin-bottom: 1.5rem;
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--footer-bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--footer-primary) 0%, var(--footer-primary-light) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link svg {
    width: 22px;
    height: 22px;
    color: var(--footer-text);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(45, 122, 62, 0.4);
}

.social-link:hover svg {
    color: white;
    transform: scale(1.1);
}

/* Specific Social Colors */
.social-link.whatsapp:hover::before {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.social-link.telegram:hover::before {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
}

.social-link.sms:hover::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.social-link.phone:hover::before {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Footer Title */
.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--footer-text);
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--footer-border);
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--footer-primary) 0%, var(--footer-primary-light) 100%);
}

/* Footer Menu */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 0.75rem;
}

.footer-menu a {
    color: var(--footer-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-right: 1rem;
}

.footer-menu a::before {
    content: '←';
    position: absolute;
    right: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.footer-menu a:hover {
    color: var(--footer-link);
    padding-right: 1.5rem;
    text-shadow: 0 0 8px rgba(103, 232, 249, 0.3);
}

.footer-menu a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Contact List */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.contact-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-list svg {
    width: 20px;
    height: 20px;
    color: var(--footer-primary);
    flex-shrink: 0;
}

.contact-list span,
.contact-list a {
    color: var(--footer-text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-list a:hover {
    color: var(--footer-link);
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-4px);
}

.contact-item i {
    color: var(--footer-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-item a,
.contact-item address,
.contact-item p {
    color: var(--footer-text-light);
    text-decoration: none;
    margin: 0;
    font-style: normal;
    line-height: 1.6;
}

.contact-item a:hover {
    color: var(--footer-link);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Quick Links */
.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links li {
    margin-bottom: 0.75rem;
}

.quick-links a {
    color: var(--footer-text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding-right: 1rem;
}

.quick-links a i {
    color: var(--footer-primary);
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.quick-links a:hover {
    color: var(--footer-link);
    padding-right: 1.5rem;
}

.quick-links a:hover i {
    transform: translateX(-4px);
}

/* Certificates Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cert-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
}

.cert-item i {
    color: var(--footer-primary);
    font-size: 1.5rem;
}

.cert-item span {
    color: var(--footer-text-light);
    font-size: 0.85rem;
    text-align: center;
}

.cert-item:hover span {
    color: var(--footer-link);
}

.cert-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Social Media */
.social-media {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--footer-bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--footer-primary) 0%, var(--footer-primary-light) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover::before {
    opacity: 1;
}

.social-icon i {
    font-size: 1.25rem;
    color: var(--footer-text);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(45, 122, 62, 0.4);
}

.social-icon:hover i {
    color: white;
    transform: scale(1.1);
}

/* Footer Middle */
.footer-middle {
    width: 100%;
    padding: 3rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.about-section {
    max-width: 1400px;
    margin: 0 auto;
}

.about-content p {
    color: var(--footer-text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.departments {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.department-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.department-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--footer-primary);
    transform: translateY(-4px);
}

.department-item h4 {
    color: var(--footer-primary);
    font-size: 1.125rem;
    margin: 0 0 0.75rem 0;
    font-weight: 700;
}

.department-item p {
    color: var(--footer-text-light);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

/* Footer Bottom */
.footer-bottom {
    background: var(--footer-bg-dark);
    border-top: 1px solid var(--footer-border);
    padding: 1.5rem 0;
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-bottom-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--footer-text-light);
    text-align: center;
}

.footer-bottom-content a {
    color: var(--footer-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-content a:hover {
    color: var(--footer-primary-light);
}

.copyright {
    margin: 0;
    font-size: 0.9rem;
    color: var(--footer-text-light);
    text-align: center;
    font-weight: 500;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-bottom-links a {
    color: var(--footer-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--footer-link);
    text-shadow: 0 0 8px rgba(103, 232, 249, 0.3);
}

.footer-bottom-links .separator {
    color: var(--footer-border);
    font-size: 0.875rem;
}

/* Footer Powered By */
.footer-powered {
    width: 100%;
    text-align: center;
    padding: 1.5rem 1.5rem 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1.5rem;
}

.footer-powered p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--footer-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.takbit-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--footer-link);
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: rgba(103, 232, 249, 0.1);
    transition: all 0.3s ease;
}

.takbit-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.takbit-link:hover {
    background: rgba(103, 232, 249, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 232, 249, 0.3);
}

.takbit-link:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   Responsive Design
   =============================================== */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 2rem;
    }
    
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .departments {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certificates-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1.5fr;
        gap: 3rem;
    }
    
    .footer-top {
        padding: 5rem 3rem 4rem;
    }
    
    .departments {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .footer-top {
        padding: 6rem 4rem 5rem;
    }
}

/* Mobile Optimization */
@media (max-width: 767px) {
    .modern-footer {
        margin-top: 3rem;
    }
    
    .footer-container {
        padding: 3rem 1rem 2rem;
        gap: 2.5rem;
    }
    
    .footer-logo h3 {
        font-size: 1.25rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
    }
    
    /* Mobile Inline Layout for Links and Services */
    .footer-links,
    .footer-services {
        padding: 1rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .footer-title {
        font-size: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        text-align: center;
    }
    
    .footer-title::after {
        width: 40px;
        right: 50%;
        transform: translateX(50%);
    }
    
    /* Inline Grid Layout for Menu Items */
    .footer-links .footer-menu,
    .footer-services .footer-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem 0.75rem;
    }
    
    .footer-menu li {
        margin-bottom: 0;
    }
    
    .footer-menu a {
        padding: 0.65rem 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
        font-size: 0.85rem;
        font-weight: 500;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        padding-right: 0.75rem;
        position: relative;
        overflow: hidden;
    }
    
    .footer-menu a::before {
        display: none;
    }
    
    .footer-menu a::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(134, 239, 172, 0.15) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .footer-menu a:hover {
        padding-right: 0.75rem;
        background: rgba(255, 255, 255, 0.08);
        border-color: var(--footer-primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
    }
    
    .footer-menu a:hover::after {
        opacity: 1;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link svg {
        width: 20px;
        height: 20px;
    }
    
    .footer-powered {
        padding: 1rem 1rem 0.5rem;
    }
    
    .footer-powered p {
        font-size: 0.8rem;
    }
    
    .takbit-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
        letter-spacing: 0.06em;
    }
    
    .takbit-link svg {
        width: 16px;
        height: 16px;
    }
}

/* Print Styles */
@media print {
    .modern-footer {
        background: white;
        color: black;
        page-break-inside: avoid;
    }
    
    .footer-social,
    .footer-bottom-links {
        display: none;
    }
    
    .modern-footer::before {
        display: none;
    }
    
    .takbit-link {
        color: black;
        background: none;
    }
}

/* Dark Mode Override (if needed) */
@media (prefers-color-scheme: light) {
    /* Footer is already dark, so no changes needed */
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .modern-footer *,
    .modern-footer *::before,
    .modern-footer *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .modern-footer {
        border-top: 3px solid var(--footer-primary);
    }
    
    .footer-menu a,
    .footer-bottom-links a {
        text-decoration: underline;
    }
}

