/* ========================================
   RESPONSIVE CSS - Mobile-First Approach
   ======================================== */

/* Base Mobile Styles (320px+) */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* ========================================
   BEAUTIFUL HAMBURGER MENU DESIGN
   ======================================== */

/* Hamburger Button */
.hamburger {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hamburger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.hamburger:active {
    transform: scale(0.95);
}

.hamburger i {
    color: #fff;
    font-size: 20px;
    transition: all 0.3s ease;
}

.hamburger.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: rotate(90deg);
}

.hamburger.active i {
    transform: rotate(180deg);
}

/* Mobile Navigation */
.nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    padding: 80px 0 30px 0;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.nav.active {
    right: 0;
}

.nav a {
    display: block;
    padding: 16px 30px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #fff;
    padding-left: 40px;
}

.nav a:hover::before {
    transform: scaleY(1);
}

.nav a.active {
    background: rgba(102, 126, 234, 0.2);
    color: #fff;
    border-left: 4px solid #667eea;
}

/* Content Overlay */
.content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.content-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Scrollbar for mobile menu */
.nav::-webkit-scrollbar {
    width: 6px;
}

.nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.nav::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.nav::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

main {
    padding: 20px 15px;
    max-width: 100%;
}

/* Typography Responsive */
h1 {
    font-size: 1.75rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Hero Section - Mobile First */
.hero-section {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    max-height: 600px;
    overflow: hidden;
    position: relative;
}

.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 177.77vh;
    height: 100vh;
    min-width: 100%;
    min-height: 56.25vw;
    pointer-events: none;
}

/* Featured Martyrs Section */
.featured-martyrs {
    padding: 2rem 1rem;
}

.featured-martyrs h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Martyrs Grid - Mobile First */
.martyrs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
}

.martyr-card {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.martyr-card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top;
}

.martyr-card-content {
    padding: 1.25rem;
}

.martyr-card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
}

.martyr-dates {
    font-size: 0.9rem;
    margin: 0;
    padding-top: 0.75rem;
}

.martyr-card.gold-card::before {
    font-size: 9px;
    padding: 3px 20px;
    right: -30px;
    top: 15px;
}

/* Martyr Detail Page (haqqinda.php) */
.martyr-detail-container {
    max-width: 100%;
    padding: 1rem;
}

.martyr-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.martyr-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
}

.martyr-info {
    width: 100%;
    text-align: center;
}

.martyr-info p {
    font-size: 0.95rem;
    margin: 0.6rem 0;
    padding: 0.4rem 0;
}

.martyr-body {
    padding: 1.5rem;
}

.medals-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.medals-list li {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Memory Cards */
.memory-card {
    margin-bottom: 1.5rem;
}

.memory-card .card-header {
    padding: 1rem;
    font-size: 0.85rem;
}

.memory-card .card-body {
    padding: 1rem;
}

.memory-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

.memory-gallery {
    margin-top: 1rem;
}

.memory-gallery .col-6 {
    padding: 0.25rem;
}

/* Forms - Mobile First */
.submission-form-container {
    padding: 1.5rem;
    margin-top: 2rem;
}

.submission-form-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.submission-form-container h4 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-check-label {
    font-size: 0.85rem;
    line-height: 1.4;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.row > [class*='col-'] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Search Page */
main > h1 {
    text-align: center;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem auto;
    max-width: 600px;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    text-align: center;
}

.search-form button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* Gallery Grid - Mobile First */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 250px;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}

.gallery-overlay p {
    font-size: 0.85rem;
    margin: 0 0 0.75rem 0;
}

.gallery-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Tables - Mobile First */
.martyrs-table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.martyrs-table thead {
    display: none;
}

.martyrs-table tbody {
    display: block;
}

.martyrs-table tr {
    display: block;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.martyrs-table td {
    display: block;
    text-align: left;
    padding: 0.5rem 0;
    border: none;
}

.martyrs-table td::before {
    content: attr(data-label);
    font-weight: bold;
    display: inline-block;
    width: 120px;
}

/* Buttons */
.hero-button,
.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    text-align: center;
    display: block;
}

/* ========================================
   TABLET STYLES (576px+)
   ======================================== */
@media (min-width: 576px) {
    main {
        padding: 30px 20px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .martyrs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .martyr-card-img {
        height: 280px;
    }

    .search-form {
        flex-direction: row;
    }

    .search-form input[type="text"] {
        flex: 1;
    }

    .search-form button {
        width: auto;
        min-width: 150px;
    }

    .medals-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .memory-gallery .col-6 {
        width: 50%;
    }

    .hero-button,
    .btn {
        width: auto;
        display: inline-block;
    }
}

/* ========================================
   DESKTOP STYLES (768px+)
   ======================================== */
@media (min-width: 768px) {
    /* Hide hamburger menu on desktop */
    .hamburger {
        display: none;
    }

    /* Desktop Navigation */
    .nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        box-shadow: none;
        overflow-y: visible;
    }

    .nav a {
        padding: 10px 20px;
        font-size: 15px;
        border-radius: 8px;
        border-left: none;
    }

    .nav a:hover {
        padding-left: 20px;
        background: rgba(102, 126, 234, 0.15);
    }

    .nav a.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
        border-left: none;
    }

    .nav a::before {
        display: none;
    }

    /* Hide overlay on desktop */
    .content-overlay {
        display: none;
    }

    /* Header positioning */
    .header {
        position: relative;
        padding: 20px 0;
        background: transparent;
    }

    main {
        padding: 40px 5%;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-section {
        height: 100vh;
        max-height: none;
    }

    .featured-martyrs {
        padding: 4rem 2rem;
    }

    .featured-martyrs h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .martyrs-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .martyr-card-img {
        height: 300px;
    }

    .martyr-card.gold-card::before {
        font-size: 11px;
        padding: 4px 30px;
        right: -35px;
        top: 20px;
    }

    .martyr-detail-container {
        max-width: 900px;
        padding: 2rem;
        margin: 0 auto;
    }

    .martyr-header {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 2rem;
    }

    .martyr-img {
        width: 250px;
        height: 250px;
        margin-right: 2rem;
    }

    .martyr-info {
        text-align: left;
    }

    .martyr-info p {
        font-size: 1rem;
        padding-left: 1rem;
    }

    .martyr-body {
        padding: 2rem;
    }

    .medals-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .memory-card .card-header {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .memory-card .card-body {
        padding: 1.5rem;
    }

    .memory-text {
        font-size: 1.05rem;
    }

    .memory-gallery .col-md-3 {
        width: 25%;
    }

    .submission-form-container {
        padding: 2rem;
    }

    .submission-form-container h2 {
        font-size: 1.8rem;
    }

    .row > [class*='col-'] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .gallery-image {
        height: 300px;
    }

    .gallery-overlay {
        transform: translateY(100%);
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .gallery-item:hover .gallery-overlay {
        transform: translateY(0);
    }

    .gallery-overlay h3 {
        font-size: 1.2rem;
    }

    .gallery-overlay p {
        font-size: 0.9rem;
    }

    .martyrs-table {
        display: table;
    }

    .martyrs-table thead {
        display: table-header-group;
    }

    .martyrs-table tbody {
        display: table-row-group;
    }

    .martyrs-table tr {
        display: table-row;
        margin-bottom: 0;
        padding: 0;
    }

    .martyrs-table td {
        display: table-cell;
        padding: 1.2rem 1rem;
        border-bottom: 1px solid #333;
    }

    .martyrs-table td::before {
        display: none;
    }
}

/* ========================================
   LARGE DESKTOP STYLES (992px+)
   ======================================== */
@media (min-width: 992px) {
    .martyrs-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .medals-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .martyr-detail-container {
        max-width: 1200px;
    }
}

/* ========================================
   EXTRA LARGE DESKTOP STYLES (1200px+)
   ======================================== */
@media (min-width: 1200px) {
    main {
        max-width: 1400px;
        margin: 0 auto;
    }

    .martyrs-grid {
        max-width: 1400px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.w-100 { width: 100%; }

.img-fluid {
    max-width: 100%;
    height: auto;
}

.rounded {
    border-radius: 0.25rem;
}

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

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ========================================
   HAQQINDA.PHP SPECIFIC STYLES
   ======================================== */
.memories-section {
    margin-top: 2rem;
}

.memories-section h2 {
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.memory-card {
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.memory-card:hover {
    transform: translateY(-5px);
}

.memory-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid #f0f0f0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    transition: transform 0.2s ease-in-out;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Form Select Styles */
.form-select {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select option {
    padding: 8px 12px;
}

/* Blog and Teams Page Styles */
.blog-post,
.team-member {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
}

.blog-post h2,
.team-member h3 {
    margin-top: 0;
}

/* About Page Styles */
.about-content {
    max-width: 100%;
    padding: 1rem;
}

/* Feedback Page Styles */
.feedback-form {
    max-width: 100%;
    padding: 1rem;
}

.feedback-form .form-group {
    margin-bottom: 1.5rem;
}

/* Top 100 Page Styles */
.top-100-container {
    padding: 2rem 1rem;
    margin-top: 1rem;
}

.top-100-container h1 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

/* ========================================
   PARTNERSHIP SECTION - MARQUEE
   ======================================== */
.partnership {
    padding: 1.5rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    overflow: hidden;
}

.partnership h2 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.partnership-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.partnership-track {
    display: flex;
    gap: 2rem;
    animation: marquee 40s linear infinite;
    will-change: transform;
}

.partnership-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.partner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: #222222;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    flex-shrink: 0;
}

.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.partner-card:hover::before {
    opacity: 1;
}

.partner-logo {
    width: 100%;
    max-width: 160px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: grayscale(20%);
}

.partner-card:hover .partner-logo img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.partner-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #ff8c00;
    text-align: center;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.partner-card:hover .partner-name {
    color: #ffa500;
}

/* Responsive adjustments for tablets and up */
@media (min-width: 768px) {
    .memories-section h2 {
        margin-bottom: 3rem;
    }

    .blog-post,
    .team-member {
        padding: 2rem;
    }

    .about-content {
        max-width: 900px;
        margin: 0 auto;
        padding: 2rem;
    }

    .feedback-form {
        max-width: 800px;
        margin: 0 auto;
        padding: 2rem;
    }

    .top-100-container {
        padding: 3rem 1.5rem;
        margin-top: 2rem;
    }

    .top-100-container h1 {
        font-size: 2.5rem;
        margin-bottom: 2.5rem;
    }

    /* Partnership responsive */
    .partnership {
        padding: 2rem 0;
    }

    .partnership h2 {
        font-size: 1.5rem;
    }

    .partnership-track {
        gap: 2.5rem;
    }

    .partner-card {
        min-width: 200px;
        padding: 1.25rem 1.75rem;
    }

    .partner-logo {
        max-width: 180px;
        height: 90px;
    }

    .partner-name {
        font-size: 0.85rem;
    }
}

/* Responsive adjustments for desktop */
@media (min-width: 992px) {
    .about-content {
        max-width: 1200px;
    }

    /* Partnership desktop */
    .partnership-track {
        gap: 3rem;
    }

    .partner-card {
        min-width: 220px;
    }

    .partner-logo {
        max-width: 200px;
        height: 100px;
    }

    .partner-name {
        font-size: 0.9rem;
    }
}
