/* Publications Page Specific Styles */
.publications-hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
    margin-top: 80px; /* Add margin to account for fixed navbar */
}

.publications-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.publications-hero-content {
    z-index: 2;
}

.publications-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.publications-hero-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.publications-search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.publications-search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.publications-search-input:focus {
    outline: none;
    border-color: #147119;
    box-shadow: 0 0 0 3px rgba(20, 113, 25, 0.1);
}

.publications-search-btn {
    padding: 1rem 2rem;
    background: #147119;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(20, 113, 25, 0.3);
}

.publications-search-btn:hover {
    background: #0f5a14;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 113, 25, 0.4);
}

.publications-hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.publications-book-stack {
    position: relative;
    z-index: 2;
}

.publications-book {
    width: 120px;
    height: 160px;
    border-radius: 8px;
    position: absolute;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.publications-book:nth-child(1) {
    background: linear-gradient(135deg, #28a745, #20c997);
    transform: rotate(-5deg) translateY(0px);
    z-index: 5;
}

.publications-book:nth-child(2) {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    transform: rotate(-2deg) translateY(10px);
    z-index: 4;
}

.publications-book:nth-child(3) {
    background: linear-gradient(135deg, #fd7e14, #ffc107);
    transform: rotate(2deg) translateY(20px);
    z-index: 3;
}

.publications-book:nth-child(4) {
    background: linear-gradient(135deg, #17a2b8, #6c757d);
    transform: rotate(5deg) translateY(30px);
    z-index: 2;
}

.publications-book:nth-child(5) {
    background: linear-gradient(135deg, #147119, #28a745);
    transform: rotate(8deg) translateY(40px);
    z-index: 1;
}

.publications-floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.publications-floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
}

.publications-floating-icon:nth-child(1) {
    background: #28a745;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.publications-floating-icon:nth-child(2) {
    background: #6f42c1;
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.publications-floating-icon:nth-child(3) {
    background: #fd7e14;
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Publications Grid Section */
.publications-grid-section {
    padding: 4rem 0;
    background: white;
}

.publications-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.publications-section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3rem;
}

.publications-section-title span {
    color: #147119;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.publications-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f8f9fa;
    position: relative;
    overflow: hidden;
}

.publications-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #147119, #28a745);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.publications-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

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

.publications-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.publications-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-right: 1rem;
}

.publications-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.publications-card-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.publications-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.publications-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.publications-card-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.publications-download-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #147119, #28a745);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.publications-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.publications-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 113, 25, 0.3);
}

.publications-download-btn:hover::before {
    left: 100%;
}

.publications-download-btn:active {
    transform: translateY(0);
}

/* Book-like animation for download button */
.publications-download-btn.book-animation {
    animation: bookFlip 0.6s ease-in-out;
}

@keyframes bookFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(360deg); }
}

/* Loading animation for search */
.publications-loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.publications-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #147119;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .publications-hero-section {
        margin-top: 90px; /* Adjust for tablet navbar */
        min-height: 75vh;
    }
}

@media (max-width: 768px) {
    .publications-hero-section {
        margin-top: 100px; /* Increase margin for mobile navbar */
        min-height: 70vh;
        padding: 1.5rem 0;
    }

    .publications-hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 1rem;
    }

    .publications-hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .publications-hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .publications-search-container {
        flex-direction: column;
    }

    .publications-grid {
        grid-template-columns: 1fr;
    }

    .publications-card {
        padding: 1.5rem;
    }

    .publications-floating-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .publications-hero-section {
        margin-top: 110px; /* Further increase for small mobile */
        min-height: 65vh;
        padding: 1rem 0;
    }

    .publications-hero-container {
        padding: 0 0.5rem;
    }

    .publications-hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .publications-hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .publications-hero-section {
        margin-top: 120px; /* Maximum margin for very small screens */
        min-height: 60vh;
    }

    .publications-hero-title {
        font-size: 1.8rem;
        line-height: 1.1;
    }

    .publications-section-title {
        font-size: 2rem;
    }

    .publications-card {
        padding: 1rem;
    }

    .publications-search-input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .publications-search-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .publications-hero-section {
        margin-top: 130px; /* Extra margin for very small devices */
    }

    .publications-hero-title {
        font-size: 1.6rem;
    }

    .publications-hero-subtitle {
        font-size: 0.9rem;
    }
}

/* Additional styles for new publications */
.publications-card.speech {
    border-left: 4px solid #6f42c1;
}

.publications-card.research {
    border-left: 4px solid #17a2b8;
}

.publications-card.historical {
    border-left: 4px solid #fd7e14;
}

.publications-card.development {
    border-left: 4px solid #28a745;
}

.publications-card.pandemic {
    border-left: 4px solid #dc3545;
}
