/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Smooth transitions */
a, button {
    transition: all 0.3s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
}

/* Button Hover Effects */
button:active {
    transform: scale(0.98);
}

/* Link Styles */
a {
    color: inherit;
    text-decoration: none;
}

a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Card Hover Effect */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr !important;
    }
}

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
}

/* ============================================
   CUSTOM STYLES FOR SAS PUBLISHERS
   ============================================ */

/* Admin Dashboard Custom Styles */
.admin-sidebar {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    box-shadow: 0 0 24px rgba(30, 58, 138, 0.15);
}
.admin-sidebar a {
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
    margin-bottom: 4px;
}
.admin-sidebar a.active, .admin-sidebar a:hover {
    background: #1e40af;
    color: #fff;
}
.admin-topbar {
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.07);
    background: #fff;
}
.admin-card {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.10);
    transition: transform 0.2s, box-shadow 0.2s;
}
.admin-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 16px 32px rgba(30, 58, 138, 0.15);
}
.admin-lang-selector {
    border-radius: 8px;
    border: 1px solid #2563eb;
    background: #eff6ff;
    color: #1e3a8a;
    font-weight: 600;
    padding: 6px 12px;
    margin-left: 12px;
}
.admin-lang-selector:focus {
    outline: 2px solid #2563eb;
}

.gradient-primary {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
}

.gradient-hover {
    transition: all 0.3s ease;
}

.gradient-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(13, 148, 136, 0.3);
}

.section-title {
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #fbbf24);
}

.card-with-shadow {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.card-with-shadow:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Mobile Menu Animation Styles */
#mobileMenu {
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    visibility: hidden;
}

#mobileMenu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Backward compatibility for hidden class (old pages use this) */
#mobileMenu.hidden {
    display: none !important;
}

#mobileMenu a, #mobileMenu button {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

#mobileMenu.show a, #mobileMenu.show button {
    opacity: 1;
    transform: translateX(0);
}

#mobileMenu.show a:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.show a:nth-child(2), #mobileMenu.show button:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.show a:nth-child(3), #mobileMenu.show button:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.show a:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.show a:nth-child(5) { transition-delay: 0.3s; }
#mobileMenu.show a:nth-child(6) { transition-delay: 0.35s; }
#mobileMenu.show a:nth-child(7) { transition-delay: 0.4s; }
#mobileMenu.show a:nth-child(8) { transition-delay: 0.45s; }

#forAuthorsMenu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#forAuthorsMenu.show {
    max-height: 300px;
    opacity: 1;
}

/* Backward compatibility for hidden class (old pages use this) */
#forAuthorsMenu.hidden {
    display: none !important;
    max-height: 0;
    opacity: 0;
}

#forAuthorsMenu a {
    opacity: 0;
    transform: translateX(-15px);
    transition: all 0.2s ease;
}

#forAuthorsMenu.show a {
    opacity: 1;
    transform: translateX(0);
}

#forAuthorsMenu.show a:nth-child(1) { transition-delay: 0.05s; }
#forAuthorsMenu.show a:nth-child(2) { transition-delay: 0.1s; }
#forAuthorsMenu.show a:nth-child(3) { transition-delay: 0.15s; }
#forAuthorsMenu.show a:nth-child(4) { transition-delay: 0.2s; }
#forAuthorsMenu.show a:nth-child(5) { transition-delay: 0.25s; }
#forAuthorsMenu.show a:nth-child(6) { transition-delay: 0.3s; }
#forAuthorsMenu.show a:nth-child(7) { transition-delay: 0.35s; }

/* Menu Toggle Button Animation */
#menuToggle {
    transition: all 0.3s ease;
}

#menuToggle.active {
    transform: rotate(90deg);
}

/* For Authors Arrow Animation */
#forAuthorsArrow {
    transition: transform 0.3s ease;
    display: inline-block;
}

#forAuthorsArrow.rotated {
    transform: rotate(180deg);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 2rem !important;
    }
    
    .journal-carousel {
        scroll-behavior: smooth;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .navbar-menu {
        flex-wrap: wrap;
    }

    .sidebar-menu {
        position: relative !important;
        margin-bottom: 2rem;
    }

    .section-container {
        padding: 1rem !important;
    }

    .card-grid {
        grid-template-columns: 1fr !important;
    }

    .timeline-circle {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.25rem !important;
    }

    .text-description {
        margin-left: 0.5rem;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    .container {
        padding: 0.5rem !important;
    }

    .top-header {
        flex-direction: column !important;
        gap: 0.5rem !important;
        font-size: 0.75rem !important;
    }

    .logo-section {
        flex-direction: column !important;
        text-align: center;
    }

    .nav-menu a {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }

    .hero-content {
        position: relative !important;
        width: 100% !important;
        background-color: rgba(0, 0, 0, 0.8) !important;
        padding: 1.5rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .hero-heading {
        font-size: 1.75rem !important;
    }

    .hero-description {
        font-size: 0.875rem !important;
    }

    .journal-card {
        width: 100% !important;
        margin: 0 !important;
    }

    .stats-card {
        padding: 1rem !important;
    }

    .stats-card-emoji {
        font-size: 2.5rem !important;
    }

    .mission-section {
        flex-direction: column !important;
    }

    .mission-text {
        width: 100% !important;
        margin-bottom: 1.5rem;
    }

    .mission-stats {
        width: 100% !important;
    }

    .article-section {
        flex-direction: column !important;
    }

    .article-sidebar {
        width: 100% !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        margin-bottom: 1rem;
    }

    .article-sidebar button {
        flex-shrink: 0;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.65rem !important;
    }

    .article-content {
        width: 100% !important;
    }

    .article-card {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .article-image {
        width: 100% !important;
        height: auto !important;
    }

    .footer {
        grid-template-columns: 1fr !important;
    }

    .footer-section {
        text-align: center;
    }

    .button-cta {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }

    .sidebar-menu {
        margin-bottom: 1.5rem;
        position: relative !important;
    }

    .sidebar-menu a {
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }

    .content-area {
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.25rem !important;
    }

    h2 {
        font-size: 1rem !important;
    }

    .nav-menu {
        flex-direction: row !important;
        overflow-x: auto !important;
    }

    .nav-menu a {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.65rem !important;
        white-space: nowrap;
    }

    .hero-heading {
        font-size: 1.5rem !important;
    }

    .hero-description {
        font-size: 0.75rem !important;
    }

    .button-cta {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-card-emoji {
        font-size: 2rem !important;
    }

    .stats-card-value {
        font-size: 1.25rem !important;
    }

    .timeline-circle {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }

    .timeline-item {
        gap: 0.5rem !important;
    }

    .timeline-text h4 {
        font-size: 0.875rem !important;
    }

    .timeline-text p {
        font-size: 0.7rem !important;
    }

    .footer-section {
        margin-bottom: 1rem;
    }

    .article-sidebar button {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.6rem !important;
    }
}

/* ============================================
   LOGIN FORM STYLES
   ============================================ */

.login-container {
    min-height: calc(100vh - 200px);
}

.login-form {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-field:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}
