/* 
 * Powerline Research Publication
 * Main Stylesheet
 * Colors: Yellow #fcd700, Purple #39115d, White #fdfefe, Brown #713f3f
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-yellow: #fcd700;
    --color-purple: #39115d;
    --color-white: #fdfefe;
    --color-brown: #713f3f;
    --color-light-bg: #f9f9f9;
    --transition: all 0.3s ease;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--color-purple);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-brown);
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: Arial, Helvetica, sans-serif;
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.8rem;
}

p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

a {
    color: var(--color-purple);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-yellow);
}

/* Container & Grid */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

/* Header/Navbar - Simple Design with Scroll Fade Effect */
header {
    background: var(--color-brown);
    color: var(--color-yellow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0.6rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    transition: padding 0.3s ease;
}

header.scrolled .navbar {
    padding: 0.3rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-yellow);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.logo img {
    height: 40px;
    width: auto;
    transition: height 0.3s ease;
}

header.scrolled .logo img {
    height: 32px;
}

/* Desktop Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    position: static;
    background: transparent;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--color-yellow);
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    display: block;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-yellow);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover {
    color: #fff;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-yellow);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    position: relative;
    flex-shrink: 0;
}

.mobile-toggle:hover {
    color: #e6c200;
    transform: scale(1.05);
}

.mobile-toggle:active {
    transform: scale(0.95);
}

.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-yellow);
    color: var(--color-purple);
}

.btn-primary:hover {
    background: #e6c200;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--color-purple);
    color: var(--color-yellow);
}

.btn-secondary:hover {
    background: #2a0a3d;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--color-yellow);
    border: 2px solid var(--color-yellow);
}

.btn-outline:hover {
    background: var(--color-yellow);
    color: var(--color-purple);
}

/* Mobile Button Styling */
@media (max-width: 768px) {
    .btn {
        padding: 0.85rem 1.2rem;
        font-size: 0.95rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-primary,
    .btn-secondary {
        min-width: 100px;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-purple) 0%, #4a1a6f 50%, #2a0a3d 100%);
    color: var(--color-yellow);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(252, 215, 0, 0.1) 0%, transparent 50%);
    animation: bgPulse 6s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: slideInUp 0.8s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    color: var(--color-yellow);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Search Bar */
.search-container {
    background: var(--color-white);
    border-radius: 10px;
    padding: 1.5rem;
    max-width: 600px;
    margin: 2rem auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 1rem;
}

.search-container input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-purple);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--color-yellow);
    box-shadow: 0 0 10px rgba(252, 215, 0, 0.3);
}

/* Sections */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background: var(--color-light-bg);
}

/* Cards */
.card {
    background: var(--color-white);
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-purple);
    box-shadow: var(--shadow);
}

.card-icon {
    font-size: 3rem;
    color: var(--color-yellow);
    margin-bottom: 1rem;
}

.card-title {
    color: var(--color-purple);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonial-card {
    background: var(--color-white);
    border-left: 5px solid var(--color-purple);
    padding: 2rem;
    border-radius: 5px;
    position: relative;
    transition: var(--transition);
}

.testimonial-card:hover {
    box-shadow: var(--shadow);
}

.testimonial-author {
    color: var(--color-brown);
    font-weight: 600;
    margin-top: 1rem;
}

.testimonial-quote {
    color: var(--color-purple);
    font-size: 2rem;
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0.2;
}

/* Forms */
form {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-brown);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #eee;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-purple);
    box-shadow: 0 0 10px rgba(57, 17, 93, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--color-purple);
    border-radius: 5px;
    transition: var(--transition);
}

.pagination a {
    color: var(--color-purple);
    background: var(--color-white);
    cursor: pointer;
}

.pagination a:hover {
    background: var(--color-purple);
    color: var(--color-yellow);
}

.pagination .active {
    background: var(--color-purple);
    color: var(--color-yellow);
    border-color: var(--color-purple);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-about {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-brand-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #fcd700 0%, #e6c200 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(252, 215, 0, 0.2);
}

.footer-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 24px;
    border: 1px solid rgba(252, 215, 0, 0.2);
    background: rgba(252, 215, 0, 0.1);
    color: #fcd700;
    font-size: 0.85rem;
    font-weight: 600;
}

.footer-heading {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-heading i,
.footer-brand-icon i,
.footer-link i {
    color: #fcd700;
}

.footer-brand-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #fcd700 0%, #e6c200 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(252, 215, 0, 0.2);
}

.footer-brand-icon i {
    font-size: 1.5rem;
}

.footer-brand-title {
    color: #fcd700;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand-subtitle {
    color: #cccccc;
    margin: 0;
    font-size: 0.9rem;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 0.85rem;
}

.footer-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-link:hover {
    color: #fcd700;
    transform: translateX(3px);
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #cccccc;
    font-size: 0.95rem;
}

.footer-contact-item i {
    color: #fcd700;
    min-width: 20px;
    margin-top: 0.15rem;
}

.footer-contact-item a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-contact-item a:hover {
    color: #fcd700;
}

.footer-newsletter-form {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-newsletter-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 0.75rem 0.9rem;
    outline: none;
}

.footer-newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.footer-newsletter-button {
    background: #fcd700;
    color: #39115d;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.94rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.footer-newsletter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(252, 215, 0, 0.2);
}

.footer-bottom-row {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-bottom-left,
.footer-bottom-right {
    min-width: 240px;
}

.footer-bottom-left h5 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-social-links {
    display: flex;
    gap: 0.85rem;
}

.footer-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #cccccc;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 1.1rem;
}

.footer-social-links a:hover {
    background: #fcd700;
    color: #39115d;
    transform: translateY(-3px);
}

.footer-bottom-right p {
    color: #aaaaaa;
    margin: 0;
    line-height: 1.6;
    font-size: 0.92rem;
}

.footer-bottom-right i {
    color: #e74c3c;
}

@media (max-width: 768px) {
    footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-grid {
        gap: 2rem;
    }

    .footer-newsletter-form {
        flex-direction: column;
    }

    .footer-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .footer-bottom-right {
        text-align: left;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 2rem 0 1rem;
    }

    .footer-contact-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom-left,
    .footer-bottom-right {
        min-width: 100%;
    }
}


/* Alerts & Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(57, 17, 93, 0.1);
    border-top: 4px solid var(--color-purple);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
}


/* Mobile Responsive Design */
@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex !important;
    }
    
    .nav-menu {
        gap: 1.5rem;
        transform: translateX(-100%);
    }

    /* Mobile Menu - transform handled dynamically by JavaScript */
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        bottom: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        background: var(--color-brown);
        gap: 0;
        padding: 1.5rem 0;
        list-style: none;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 10000;
        margin: 0;
        border: none;
        
        /* Transform controlled dynamically */
        transition: transform 0.35s ease-in-out;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(252, 215, 0, 0.15);
        margin: 0;
        padding: 0;
    }

    .nav-menu li:first-child {
        border-top: none;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        color: var(--color-yellow);
        min-height: 48px;
        transition: all 0.2s ease;
    }

    .nav-menu a:hover {
        background: rgba(252, 215, 0, 0.1);
        color: #fff;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.75rem 0;
    }

    header.scrolled {
        padding: 0.5rem 0;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .logo img {
        height: 36px;
    }

    .mobile-toggle {
        display: flex !important;
    }

    /* Hide desktop nav-right on mobile */
    .nav-right {
        display: none !important;
    }

    .btn {
        padding: 0.85rem 1.2rem;
        font-size: 0.95rem;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.6rem 0;
    }

    header.scrolled {
        padding: 0.5rem 0;
    }

    .navbar {
        padding: 0.3rem 0;
    }

    .logo img {
        height: 30px;
    }

    .mobile-toggle {
        font-size: 1.4rem;
        width: 40px;
        height: 40px;
    }

    .nav-menu {
        top: 52px !important;
    }

    .nav-menu a {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .navbar .nav-right > div:not(.nav-right-buttons) {
        display: none;
    }

    .hero {
        padding: 3rem 0;
        min-height: 60vh;
    }

    .search-container {
        flex-direction: column;
    }

    .row {
        grid-template-columns: 1fr;
    }

    section {
        padding: 2rem 0;
    }

    .pagination {
        gap: 0.25rem;
    }

    .pagination a,
    .pagination span {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Notification Bell Animation */
.notification-bell.ringing {
    animation: bellRing 1s ease-in-out;
}

@keyframes bellRing {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: rotate(-10deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(10deg);
    }
}
