/*
Theme Name: Instagram Story Downloader
Theme URI: https://instagramstorydownload.in/
Author: Cline
Author URI: https://instagramstorydownload.in/
Description: A theme for downloading Instagram content.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: downloader, instagram
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.downloader-container {
    width: 100%;
    padding: 2rem;
}

.downloader-header {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(90deg, rgba(255,81,47,1) 0%, rgba(221,36,118,1) 50%, rgba(122,40,209,1) 100%);
    color: #fff;
}

.downloader-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.downloader-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.downloader-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tab-link {
    background: #eee;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
    margin: 0 0.5rem;
    transition: background-color 0.3s;
}

.tab-link.active,
.tab-link:hover {
    background: #d9534f;
    color: #fff;
}

.downloader-form {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 2px solid #f0f2f5;
}

.downloader-form input[type="text"] {
    flex-grow: 1;
    border: none;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    outline: none;
}

.downloader-form button {
    background: linear-gradient(90deg, rgba(255,81,47,1) 0%, rgba(221,36,118,1) 100%);
    color: #fff;
    border: none;
    padding: 0 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.downloader-form button:hover {
    opacity: 0.9;
}

.how-to-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
    top: -60px;
}

.how-to-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.how-to-steps {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.step {
    text-align: center;
    flex: 1;
}

.step-number {
    background: #d9534f;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
#downloader-results {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.result-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    text-align: center;
}
.result-item img,
.result-item video {
    max-width: 100%;
    max-height: 150px; /* Control the max height of the preview */
    border-radius: 5px;
    margin-top: 1rem; /* Add space between the button and the preview */
}

@media (max-width: 768px) {
    .result-item img,
    .result-item video {
        max-height: 120px; /* Make the preview even smaller on mobile */
    }
}
.countdown-timer {
    margin-top: 0.5rem;
}
.download-button {
    display: inline-block;
    background: linear-gradient(90deg, rgba(255,81,47,1) 0%, rgba(221,36,118,1) 100%);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
    margin-bottom: 1rem; /* This will add space below the button */
}
.result-item a:hover {
    background: #c9302c;
}

.top-header {
    background: #fff;
    padding: 0.5rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.main-header {
    background: linear-gradient(90deg, rgba(122,40,209,1) 0%, rgba(221,36,118,1) 50%, rgba(255,81,47,1) 100%);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header.scrolled {
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.site-branding {
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 50px;
    width: auto;
}

.site-title a {
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    margin-left: 1rem;
    background: linear-gradient(90deg, rgba(255,81,47,1) 0%, rgba(221,36,118,1) 50%, rgba(122,40,209,1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-navigation li {
    margin-left: 20px;
}

.main-navigation {
    display: flex;
    justify-content: center;
}

.main-navigation a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
    padding: 1rem;
    display: block;
}

.main-navigation a:hover {
    color: #d9534f;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #d9534f;
    transition: width 0.3s;
}

.main-navigation a:hover::after {
    width: 100%;
}

.site-footer {
    background: linear-gradient(90deg, rgba(122,40,209,1) 0%, rgba(221,36,118,1) 50%, rgba(255,81,47,1) 100%);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-menu ul {
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-menu a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 600;
}

.footer-menu a:hover {
    opacity: 0.8;
}

.site-info {
    margin-top: 2rem;
}

.site-info a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.mobile-header {
    display: none;
}

@media (max-width: 768px) {
    .desktop-header {
        display: none;
    }

    .mobile-header {
        display: block;
        background: #fff;
        padding: 1rem 0;
        box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    }

    .mobile-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #mobile-navigation {
        display: none;
    }

    #mobile-navigation.toggled {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.9);
        z-index: 1001;
    }

    .main-navigation ul {
        flex-direction: column;
        justify-content: center;
        height: 100%;
    }

    .main-navigation li {
        margin: 0;
        text-align: center;
    }

    .main-navigation a {
        display: block;
        padding: 1rem;
        color: #fff;
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1002;
        position: relative;
        background: transparent;
        color: #333;
        font-size: 1.5rem;
    }

    .feature {
        flex-direction: column;
        text-align: center;
    }

    .feature:nth-child(even) {
        flex-direction: column;
    }

    .top-header {
        padding: 0.5rem 0;
    }

    .top-header .container {
        justify-content: space-between;
    }

    .main-header {
        display: none;
    }

    .site-title a {
        font-size: 1.2rem;
        margin-left: 0;
    }

    .mobile-header .site-branding {
        flex-grow: 1;
    }

    .mobile-header .menu-toggle {
        border: none;
        background: transparent;
        padding: 0;
        margin: 0;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        position: relative;
        width: 24px;
        height: 24px;
    }

    .menu-toggle .icon-bars {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #333;
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        transition: background-color 0.3s;
    }

    .menu-toggle .icon-bars::before,
    .menu-toggle .icon-bars::after {
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background-color: #333;
        position: absolute;
        left: 0;
        transition: transform 0.3s;
    }

    .menu-toggle .icon-bars::before {
        transform: translateY(-8px);
    }

    .menu-toggle .icon-bars::after {
        transform: translateY(8px);
    }

    .menu-toggle.toggled .icon-bars {
        background-color: transparent;
    }

    .menu-toggle.toggled .icon-bars::before {
        transform: rotate(45deg);
    }

    .menu-toggle.toggled .icon-bars::after {
        transform: rotate(-45deg);
    }

    .menu-toggle.toggled .icon-bars::before,
    .menu-toggle.toggled .icon-bars::after {
        background-color: #fff;
    }

    .mobile-header {
        padding: 0.25rem 0;
    }

    #mobile-navigation.toggled {
        padding-top: 80px;
    }

    .footer-menu ul {
        flex-direction: column;
        gap: 1rem;
    }

    .downloader-header h1 {
        font-size: 1.8rem;
    }

    .downloader-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .downloader-form {
        flex-direction: column;
        border-radius: 10px;
        border: 1px solid #eee;
    }

    .downloader-form input[type="text"] {
        border-radius: 10px 10px 0 0;
        padding: 1rem;
    }

    .downloader-form button {
        border-radius: 0 0 10px 10px;
        padding: 1rem;
    }

    .how-to-steps {
        flex-direction: column;
    }

    .feature {
        gap: 2rem;
    }

    .feature h3 {
        font-size: 1.2rem;
    }

    .feature p {
        font-size: 0.9rem;
    }

    .why-us-section h2 {
        font-size: 1.8rem;
    }

    .faq-section h2 {
        font-size: 1.8rem;
    }

    .faq-question span {
        font-size: 1rem;
    }
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 1rem;
}

#contact-form button {
    background: #d9534f;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#contact-form button:hover {
    background: #c9302c;
}

.features-section {
    padding: 2rem 0;
}

.features-section .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.feature:nth-child(even) {
    flex-direction: row-reverse;
}

.feature i {
    font-size: 4rem;
    min-width: 80px;
    text-align: center;
    background: linear-gradient(90deg, rgba(255,81,47,1) 0%, rgba(221,36,118,1) 50%, rgba(122,40,209,1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.why-us-section {
    padding: 2rem 0;
    background: #f9f9f9;
}

.why-us-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: center;
}

.why-us-item i {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, rgba(255,81,47,1) 0%, rgba(221,36,118,1) 50%, rgba(122,40,209,1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.why-us-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.faq-section {
    padding: 2rem 0;
    background: #fff;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.faq {
    border-bottom: 1px solid #eee;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
}

.faq-question span {
    font-size: 1.2rem;
    font-weight: 600;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s;
}

.faq.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer p {
    padding: 0 0 1.5rem;
    color: #555;
}

.faq.active .faq-answer {
    max-height: 300px;
}

.content-area {
    padding: 1rem 0; /* Reduced padding */
}

.entry-header {
    margin-bottom: 1rem; /* Reduced margin */
    text-align: center;
}

.entry-title {
    font-size: 3rem;
    font-weight: 700;
}

.entry-content {
    background: #fff;
    padding: 1.5rem; /* Reduced padding */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .entry-title {
        font-size: 1.8rem;
    }
    .content-area {
        padding: 0.5rem 0;
    }
    .entry-content {
        padding: 1rem;
    }
}

#downloader-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.result-item {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thumbnail-container {
    margin-bottom: 1rem;
}

.download-button {
    display: inline-block;
    background: linear-gradient(90deg, rgba(255,81,47,1) 0%, rgba(221,36,118,1) 100%);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.download-button:hover {
    opacity: 0.9;
}

.loading-indicator {
    text-align: center;
    font-size: 1.2rem;
    color: #555;
}

.progress-bar-container {
    width: 100%;
    max-width: 500px;
    background-color: #f3f3f3;
    border-radius: 5px;
    margin: 1rem auto;
}

.progress-bar {
    width: 0%;
    height: 20px;
    background-color: #d9534f;
    border-radius: 5px;
    text-align: center;
    line-height: 20px;
    color: white;
    transition: width 1.5s ease-in-out;
}

.countdown-timer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-top: 1rem;
}
