/*
Theme Name: Turkiye IFSA AMP
Theme URI: https://turkiyeifsa.com
Author: Turkiye IFSA
Author URI: https://turkiyeifsa.com
Description: Fully mobile-optimized AMP-ready WordPress theme
Version: 1.0.23
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: turkiyeifsa-amp
Tags: amp, mobile-first, responsive, lightweight
*/

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #e0e0e0;
    background: #0f1419;
}

/* Header */
.site-header {
    background: #1a1a2e;
    color: #fff;
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-align: center;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.site-title {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: #999;
}

/* Navigation */
.main-navigation {
    margin-top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.menu-toggle {
    display: none;
    background: rgba(255,107,107,0.2);
    border: 1px solid #ff6b6b;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255,107,107,0.3);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    display: block;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    background: rgba(255,107,107,0.2);
    color: #ff6b6b;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: block;
        margin: 0 auto;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(26,26,46,0.95);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
        margin-top: 0.5rem;
        border-radius: 8px;
        z-index: 1000;
    }
    
    .main-navigation.toggled ul {
        display: flex;
    }
    
    .main-navigation a {
        width: 100%;
        text-align: center;
    }
}

/* Content */
.site-content {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.video-card {
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(255,107,107,0.2);
}

.video-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
}

.video-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,107,107,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.video-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: #0b2239;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-model {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.model-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.model-link:hover {
    color: #1da1f2;
}

.model-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #1da1f2, #0b2239);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    border: 2px solid #0e1624;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35), 0 0 0 1px rgba(29,161,242,0.25);
}

.model-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.08);
    transform-origin: center;
    display: block;
}

.model-name {
    font-weight: 700;
}

.verified-badge {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}

.verified-badge path {
    fill: #1da1f2;
}

.video-cats {
    margin: 0.35rem 0 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.video-cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #1f2733;
    color: #cfd8e3;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid #2d3b4e;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.video-cat-chip:hover {
    background: #263245;
    color: #fff;
    border-color: #3b4d66;
}

.video-meta {
    font-size: 0.875rem;
    color: #999;
    margin-top: auto;
}

/* Gutenberg latest posts tweaks */
.wp-block-latest-posts__list .wp-block-latest-posts__post-title {
    display: block;
    background: #0b2239;
    color: #fff;
    font-weight: 700;
    padding: 0.55rem 0.7rem;
    border-radius: 0.6rem;
    text-decoration: none;
}

.wp-block-latest-posts__list .video-model {
    margin-top: 0.45rem;
}

.entry-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #fff;
}

.entry-title a {
    color: #fff;
    text-decoration: none;
}

.entry-title a:hover {
    color: #ff6b6b;
}

.entry-content {
    margin-top: 1rem;
    color: #e0e0e0;
}

.entry-content img,
.entry-content video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* Enforce 16:9 aspect on featured images */
.post-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* HLS Video Container */
.hls-video-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 1.5rem;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    padding-top: 56.25%;
}

.hls-video-container .video-js,
.hls-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Single Video Page - Sadece video */
.single-video-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.single-video-page .entry-header {
    margin-bottom: 2rem;
    text-align: center;
}

.single-video-page .entry-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.single-video-container {
    margin: 0 auto;
}

.single-video-container .hls-video-container {
    margin: 0 auto 1.5rem;
}

.single article {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.single .entry-content {
    margin-top: 1rem;
}

.single .entry-content > *:first-child {
    margin-top: 0;
}

.single .entry-content .hls-video-container {
    margin-top: 0;
}

/* Remove excess padding around non-AMP video embeds on single */
.single .entry-content .video-container {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* VideoJS Styling */

/* Ensure all video containers maintain 16:9 aspect */
.entry-content .video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
    margin: 1.5rem auto;
    max-width: 1280px;
}

.entry-content .video-container iframe,
.entry-content .video-container video,
.entry-content .video-container embed,
.entry-content .video-container object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Force all videos to live in a 16:9 box and letterbox portrait clips */
.entry-content video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    border-radius: 8px;
    display: block;
}

.entry-content .video-container video {
    object-fit: contain;
}

.video-js {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 1280px;
    background: #000;
    border-radius: 8px;
}

.video-js .vjs-tech {
    object-fit: contain;
}

.video-js video::-webkit-media-controls,
.video-js video::-webkit-media-controls-panel,
.video-js video::-webkit-media-controls-enclosure {
    display: none !important;
    -webkit-appearance: none !important;
}

/* Force video elements to show controls */
video {
    max-width: 100%;
    height: auto;
}

video::-webkit-media-controls {
    display: flex !important;
}

video::-webkit-media-controls-panel {
    display: flex !important;
}
}

.hls-video-container .video-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
}

.video-js .vjs-big-play-button {
    border: none;
    background-color: rgba(255,107,107,0.9);
    font-size: 3em;
    border-radius: 50%;
    width: 2em;
    height: 2em;
    line-height: 2em;
    margin-top: -1em;
    margin-left: -1em;
}

.video-js .vjs-big-play-button:hover {
    background-color: rgba(255,107,107,1);
}

.video-js .vjs-control-bar {
    background-color: rgba(26,26,46,0.8);
}

.video-js .vjs-play-progress,
.video-js .vjs-volume-level {
    background-color: #ff6b6b;
}

.video-js .vjs-slider {
    background-color: rgba(255,255,255,0.3);
}

/* Footer */
.site-footer {
    background: #1a1a2e;
    color: #999;
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid #2a2a3e;
}

/* Pagination */
.pagination,
.nav-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span,
.nav-links a {
    padding: 0.5rem 1rem;
    background: #1a1a2e;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #2a2a3e;
    transition: all 0.3s ease;
}

.pagination a:hover,
.nav-links a:hover {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

.pagination .current {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

article {
    background: #1a1a2e;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #2a2a3e;
}

.entry-meta {
    color: #999;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Comments */
.comments-area {
    margin-top: 2.5rem;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    padding: 1.5rem;
}

.comments-area h3,
.comment-reply-title {
    color: #fff;
    margin-bottom: 1rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.comment-list .comment {
    border-bottom: 1px solid #2a2a3e;
    padding: 1rem 0;
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form label {
    color: #ccc;
    font-size: 0.9rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: #0f1419;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    padding: 0.75rem;
    color: #fff;
}

.comment-form textarea {
    min-height: 160px;
}

.comment-form .form-submit input {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: none;
    color: #fff;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.comment-form .form-submit input:hover {
    opacity: 0.9;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form-cookies-consent input {
    width: auto;
}

/* Mobile First - Already optimized */
@media (min-width: 768px) {
    .site-header {
        padding: 2rem;
    }
    
    .header-container {
        gap: 1.5rem;
    }
    
    .site-title {
        font-size: 2.5rem;
    }
    
    .site-content {
        padding: 3rem 2rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1400px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Related Videos Section */
.related-videos-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #2a2a3e;
}

.related-videos-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.related-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.related-video-card {
    background: #1a1a2e;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.related-video-card:hover {
    transform: translateY(-2px);
}

.related-video-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-video-card .video-thumbnail {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #000;
    position: relative;
}

.related-video-card .video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.related-video-card .video-title {
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .related-videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .related-videos-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
