/* ===================================
   Národní Modlitební Stráž - Main Stylesheet
   Organized Modular CSS Architecture
   =================================== */

/* Core Styles - Reset, Typography, Utilities (First for foundation) */
@import url('css/base.css');

/* Import Design System Variables (After base to override) */
@import url('design-system.css');

/* Layout - Header, Navigation, Footer */
@import url('css/layout.css');

/* Hero Section */
@import url('css/hero.css');

/* Components - Buttons, Forms, Modals, Cards */
@import url('css/components.css');

/* Calendar Specific Styles */
@import url('css/calendar.css');

/* Admin Dashboard */
@import url('css/admin.css');

/* Mobile Responsive Styles - Must be last for proper cascade */
@import url('css/mobile.css');

/* ===================================
   Prague Skyline Footer Decoration
   Custom element that doesn't fit other categories
   =================================== */
.prague-skyline-container {
    position: relative;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
    margin-top: clamp(30px, 5vh, 60px);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding-right: clamp(50px, 10vw, 250px);
    min-height: clamp(100px, 20vh, 350px);
}

.prague-skyline {
    width: clamp(300px, 70vw, 1200px);
    height: clamp(100px, 20vh, 300px);
    max-width: 85vw;
    object-fit: contain;
    object-position: right bottom;
    opacity: 0.4;
    filter: brightness(1.2);
    display: block;
    transform: translateX(0);
    margin-right: 0;
    flex-shrink: 0;
}

/* Dynamic scaling based on viewport width */
@media (min-width: 1200px) {
    .prague-skyline-container {
        padding-right: clamp(100px, 15vw, 350px);
    }
    
    .prague-skyline {
        width: clamp(500px, 60vw, 1400px);
        height: clamp(150px, 25vh, 350px);
        max-width: 75vw;
    }
}

@media (min-width: 1600px) {
    .prague-skyline-container {
        padding-right: clamp(150px, 20vw, 400px);
    }
    
    .prague-skyline {
        width: clamp(600px, 55vw, 1400px);
        height: clamp(180px, 25vh, 400px);
        max-width: 70vw;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) {
    .prague-skyline-container {
        padding-right: clamp(30px, 8vw, 120px);
    }
    
    .prague-skyline {
        width: clamp(280px, 75vw, 800px);
        height: clamp(90px, 18vh, 250px);
        max-width: 90vw;
        opacity: 0.35;
    }
}

/* Mobile adjustments for skyline */
@media (max-width: 768px) {
    .prague-skyline-container {
        margin-top: clamp(20px, 4vh, 40px);
        padding-right: clamp(20px, 6vw, 80px);
    }
    
    .prague-skyline {
        width: clamp(250px, 80vw, 600px);
        height: clamp(80px, 15vh, 200px);
        max-width: 95vw;
        opacity: 0.3;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .prague-skyline-container {
        padding-right: 0;
        justify-content: center;
        margin-top: clamp(15px, 3vh, 30px);
    }
    
    .prague-skyline {
        width: clamp(200px, 90vw, 400px);
        height: clamp(60px, 12vh, 150px);
        max-width: 98vw;
    }
}

/* ===================================
   ACCOUNT PAGE STYLES
   =================================== */

/* Account Sections */
.account-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.section-header h3 {
    color: #FFD700;
    margin: 0;
    font-size: 1.4rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* User Information Grid */
.account-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 3px solid #FFD700;
}

.info-label {
    font-weight: 600;
    color: #FFD700;
    min-width: 100px;
}

.info-value {
    color: #fff;
    text-align: right;
    word-break: break-word;
}

/* Prayer Schedule Display */
#userPrayerSchedule {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 150px;
}

.prayer-schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 6px;
    border-left: 4px solid #FFD700;
}

.prayer-day {
    font-weight: 600;
    color: #FFD700;
    min-width: 100px;
}

.prayer-time {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.prayer-recurring {
    font-size: 0.8rem;
    color: #90EE90;
    font-style: italic;
}

.no-schedule {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    padding: 2rem;
}

/* Account Actions */
.account-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.account-actions .btn {
    justify-self: stretch;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(220, 53, 69, 0.8);
    color: #fff;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-2px);
}

/* Alert Styles */
.alert {
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #fff;
}

.alert h3 {
    color: #FFC107;
    margin-top: 0;
}

.loading-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .account-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }
    
    .account-info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .info-label, .info-value {
        text-align: center;
    }
    
    .prayer-schedule-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .account-actions {
        grid-template-columns: 1fr;
    }
}

/* Profile Form Styles */
.profile-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.profile-form label {
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.profile-form input {
    padding: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.profile-form input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.profile-form input[readonly] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 215, 0, 0.1);
    color: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
}

.profile-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions button {
        width: 100%;
        max-width: 300px;
    }
}

/* ===================================
   Additional Custom Overrides
   Place any site-specific overrides here
   =================================== */

/* Prayer Management Styles */
.add-prayer-section {
    margin-bottom: 20px;
    text-align: center;
}

.prayer-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.prayer-form h4 {
    color: var(--gold);
    margin-top: 0;
    margin-bottom: 20px;
}

.prayer-form .form-group {
    margin-bottom: 15px;
}

.prayer-form label {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-bottom: 8px;
}

.prayer-form select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: white;
    border-radius: 4px;
    font-size: 16px;
}

.prayer-form select option {
    background: #333;
    color: white;
}

.prayer-form input[type="checkbox"] {
    margin-right: 8px;
}

.prayer-form .form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.prayer-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prayer-schedule-item {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 1fr;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.prayer-schedule-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.prayer-actions {
    text-align: right;
}

/* Button Styles */
.btn-primary {
    background: var(--gold);
    color: black;
    font-weight: bold;
}

.btn-primary:hover {
    background: #ffcc00;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Account Prayer Modal Styles */
.account-prayer-form {
    padding: 20px 0;
}

.account-prayer-form .form-group {
    margin-bottom: 20px;
}

.account-prayer-form label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.account-prayer-form select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: white;
    border-radius: 6px;
    font-size: 16px;
}

.account-prayer-form select option {
    background: #333;
    color: white;
}

.account-prayer-form .booking-options {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.account-prayer-form .booking-options label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.account-prayer-form .booking-options input[type="radio"] {
    margin-right: 10px;
}

.account-prayer-form #weeklyOptions {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.account-prayer-form #weeklyOptions input[type="date"] {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: white;
    border-radius: 4px;
    margin-top: 8px;
}

.account-prayer-form small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Mobile Responsive Prayer Management */
@media (max-width: 768px) {
    .prayer-schedule-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .prayer-actions {
        text-align: center;
    }

    .prayer-form .form-buttons {
        flex-direction: column;
    }

    .account-prayer-form {
        padding: 10px 0;
    }
}

/* ===================================
   PRAYER RESOURCES MODAL STYLES
   =================================== */

.prayer-resources-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.prayer-categories {
    margin-bottom: 2rem;
}

.prayer-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #FFD700;
}

.prayer-category h4 {
    color: #FFD700;
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.prayer-songs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prayer-songs li {
    padding: 0.5rem 0;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    line-height: 1.4;
}

.prayer-songs li:last-child {
    border-bottom: none;
}

.prayer-songs li:before {
    content: "♪";
    color: #FFD700;
    margin-right: 8px;
    font-size: 1.1rem;
}

.prayer-instructions {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* ===================================
   SCOPED STYLES FOR NEW DROPDOWN PAGES
   (These only apply to prayer-with-scripture and other new pages)
   =================================== */

/* Scoped styles for clickable verse pages */
.scripture-page .prayer-category {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 1.5rem;
    border-left: none;
}

.scripture-page .prayer-category h4 {
    color: #FFD700;
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: left;
}

.scripture-page .prayer-songs {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.scripture-page .prayer-songs li {
    padding: 0.5rem 0;
    color: #fff;
    border-bottom: none;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
    text-align: left;
}

.scripture-page .prayer-songs li:last-child {
    border-bottom: none;
}

.scripture-page .prayer-songs li:before {
    display: none;
}

/* Scoped verse link styling for scripture pages */
.scripture-page .verse-link {
    color: #D4AF37;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.3s ease;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.scripture-page .verse-link:hover {
    color: #F4CF57;
    text-shadow: 0 0 5px rgba(244, 207, 87, 0.3);
    transform: none;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Scoped verse expansion styling for scripture pages */
.scripture-page .verse-expansion {
    overflow: hidden;
    transition: height 0.3s ease-out;
    margin: 15px 0 25px 20px;
}

.scripture-page .verse-expansion .bible-verse-box {
    margin: 15px 0;
    background: rgba(212,175,55,0.08);
    border-left: 3px solid #D4AF37;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.scripture-page .verse-expansion .verse-reference {
    color: #D4AF37;
    font-weight: 600;
    font-style: normal;
    display: block;
    text-align: right;
    margin-top: 15px;
    font-size: 0.9em;
    opacity: 0.9;
}

.scripture-page .verse-expansion .bible-verse-box p {
    font-size: 1.05em;
    line-height: 1.7;
    color: #f5f5f5;
}

.prayer-instructions h4 {
    color: #FFD700;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.prayer-instructions p {
    color: #fff;
    margin: 0 0 0.8rem 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

.prayer-instructions p:last-child {
    margin-bottom: 0;
}

.modal-actions {
    text-align: center;
    padding-top: 1rem;
}

/* Mobile responsive adjustments for prayer modal */
@media (max-width: 768px) {
    .prayer-resources-modal .modal-content {
        margin: 1rem;
        max-height: 95vh;
    }

    .prayer-category {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .prayer-category h4 {
        font-size: 1.1rem;
    }

    .prayer-songs li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }

    .prayer-instructions {
        padding: 1rem;
    }
}

/* ===================================
   Dropdown Menu Styles (Admin Only)
   =================================== */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 5px;
}

/* Show dropdown on hover (only when display is not none) */
.dropdown-container:hover .dropdown-menu:not([style*="display: none"]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-item {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #fff !important;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700 !important;
    border-left-color: #FFD700;
}

/* Arrow indicator for dropdown parent */
.dropdown-container > a::after {
    content: "";
    display: inline-block;
    margin-left: 5px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show arrow only for admins */
.dropdown-container.admin-has-dropdown > a::after {
    opacity: 1;
}

/* Mobile - disable hover, use click instead */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0;
        margin-left: 1rem;
        box-shadow: none;
        border: none;
        border-left: 2px solid rgba(255, 215, 0, 0.3);
        background: rgba(0, 0, 0, 0.5);
    }

    .dropdown-container:hover .dropdown-menu {
        /* Disable hover on mobile */
    }

    .dropdown-container.mobile-expanded .dropdown-menu:not([style*="display: none"]) {
        display: block !important;
    }

    .dropdown-container > a::after {
        opacity: 0 !important;
    }
}

/* ===================================
   YouTube Video Grid Styles
   =================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.video-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.video-item:hover .play-button {
    background: #FFD700;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.video-item h5 {
    padding: 1rem;
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
}

/* Embedded video player */
.video-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Loading state */
.video-item.loading .video-thumbnail::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-item.loading .video-thumbnail::before {
    content: "Načítání...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFD700;
    font-size: 1.2rem;
    z-index: 10;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
    }

    .video-item h5 {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .video-grid {
        gap: 0.8rem;
    }

    .video-item h5 {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .play-button {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}